Forum Discussion
DirectQuery (bug?): all possible Date filter values are being output to SQL
True, MSSQL should handle that statement better (at the very least the huge IN() statement should be used to create a temp table which is then joined to) but even so, Power BI shouldn't be sending this statement in the first place.
Should I open a bug report for this?
I will internally forward your feedback here to relevant folks internally within the team and that should help prioritize the optimization higher on the backlog.
- jcameon6 years agoRegular Visitor
srinivt Do you know if Microsoft Team was able to research this more? This thread is over 2 years old but it's the best piece of information I've found reseraching my issue, which is exactly the same as what this thread was created for.
A 'date between' filter on my Date table sends over to sql every distinct date separately in the where clause. Modifying that line in the sql query it generates takes my result down from a few mintues to less than 2 seconds.
This could be the biggest item to make Direct Query more efficient with dates!