Forum Discussion
Direct Query using Stored Procedure with a date/time parameter
- Anonymous1 year ago
Hi kurrysamir ,
Thanks for the update!
The issue is with the slicer style. When you use the "Between" style, even for a single date, Power BI treats it as a range filter, which is not supported for dynamic M parameters. Thats why switching to a drop-down works . It applies a direct, single-value filter, which is supported. Just make sure your slicer is set to List or Drop-down, and the field is from a proper date table.
If you would like to see support for single-date "Between" slicers in the future, feel free to suggest it on the Power BI Ideas forum. Feedback submitted through these channels is frequently reviewed by the product teams and can contribute to meaningful improvements.
Hope this helps.If so,consider accepting it as solution.
Regards,
Pallavi.
Hi kurrysamir ,
Thank you for reaching out to us on Microsoft Fabric Community Forum!
The error you are seeing is likely due to security restrictions on OPENROWSET, it is often blocked by default on SQL Server for DirectQuery scenarios. A more reliable approach is to wrap your stored procedure logic into a table-valued function (TVF) that accepts a date parameter. Then, use Dynamic M Parameters in Power BI to pass the selected date directly to the TVF. This method is much better supported in DirectQuery and avoids login-mapping or remote access issues.
Hope this resolve your query.If so,consider accepting it as solution.
Regards,
Pallavi.
HI,
I am working on a similar single date picker requirement where users want to select a date using a date picker. I am using direct query instead of Import mode. Each and every time the user selects a date, there is a function that has a date parameter and gets the data for that single date. Please correct my understanding here, the single date picker would work just with Import mode and not with a Direct Query? We can not use import mode here because of a business requirement.