Issues aren’t tied to analyses. That’s why you’re not able to filter by analysis ID. Why? Well… imagine I introduced an issue on Jan 1. It showed up in that analysis and was added to the SonarQube DB.
Then on Jan 2 either:
the issue showed up again - it remains Open
the issue didn’t show up again - it is Closed
So issues either show up in every analysis, or they get closed and eventually purged from the DB.
And housekeeping means that there’s really no point in trying to tie them to that initial analysis either, because eventually that analysis record will probably be purged from the DB too.
What you’re doing with the date is the best you can do.