Forum Discussion

leina_daniel's avatar
leina_daniel
Frequent Visitor
1 year ago
Solved

Injecting a Dynamic Variable into an Analysis Services Query for Filtering Analysis Serv. Cube Data

Hello Fabric Community, I'm currently working with Analysis Services to query an anaylsis services cube and need some help with injecting a dynamic variable into the middle of my query. I have a wee...
  • V-yubandi-msft's avatar
    V-yubandi-msft
    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...