Forum Discussion
Injecting a Dynamic Variable into an Analysis Services Query for Filtering Analysis Serv. Cube Data
- 1 year ago
Thanks for sharing the update. Since your report uses DirectQuery, you can make budget code filtering dynamic without hardcoding it in your DAX query.
1.Use a slicer linked to a budget codes table to filter the data dynamically.
2. If needed, set up Row-Level Security in SSAS to restrict data based on user selection.
For an advanced option, you can try Dynamic M Query Parameters. This lets you filter directly in Power Query with parameters. Just make sure the Dynamic M Query Parameters feature is enabled under Options → Preview Features, and it's properly linked to your budget codes.
FYI:
For more details, please refer to the following documentation.
Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
Connect to Analysis Services data in Power BI Desktop - Power BI | Microsoft Learn
I hope this helps...
Hi leina_daniel ,
Has your issue been resolved, or do you require any further information? Your feedback is valuable to us. If the solution was effective, please mark it as 'Accepted Solution' to assist other community members experiencing the same issue.