Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello all,
I'd like to know if a filter in a SQL query can be changed according to a date from within the dashboard :
I import my datas from a SQL database so i prefilter my datas according to a specific date (here 01/03/2022):
So my datas are already prefiltered on the date. However, I'd like to make this filter dynamic and be able to change the date according to whats in the dashboard. So if someone changes the date in the dashboard in the green rectangle (in the screenshot bellow) and enter for example march 9th, I'd like the query to be filtered on the 9th of march. Is there any way this is possible ?
For now the only solution that I have found is to add a parameter and change the parameter, but it's not really what I want as the user has to change a parameter and cannot change the date direclty in the dashboard.
thank you !
Hi @alicemntt ,
I think the dynamic M query parameters would achieve a similar output. You need to connect to the SQL Server data source using the DirectQuery mode, and you can only change the parameter values sent to SQL Server using the slicer rather than manual input.
Dynamic M query parameters in Power BI Desktop (preview)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your response ! Actually it was not possible for me to use a Direct Query but yes otherwise it seems like it could have been a solution. But in the end I actually didn't need to change the date anymore so 🤷🏼♀️ Thank you anmyways !
NO, you can't so far.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |