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 ,
We noticed we haven't received a response from you yet, so we wanted to follow up and ensure the solution we provided addressed your issue. If you require any further assistance or have additional questions, please let us know.
Your feedback is valuable to us, and we look forward to hearing from you soon.
Thanks..