Forum Discussion

reneincer's avatar
reneincer
Advocate II
9 years ago
Solved

How does passing a parameter to MDX works?

Hi community!   I am using a SSAS model with Import option and MDX queries, I have read many posts about passing parameters to queries, and all those posts are linked to this: http://community.pow...
  • v-sihou-msft's avatar
    v-sihou-msft
    9 years ago

    reneincer

     

    In Power BI, to use parameter, you can only generate a list with existing column and use it in your source query, like you already found. There's no other way.

     

    And Power BI Query Editor extract all data first. After that if you apply parameter, it will re-generate the query with parameter selection as condition. It's unlike the parameters in Reporting Services. The Query Editor in SSRS will generate a hidden dataset for each parameter used in MDX.

     

    In your scenario, I suggest you import the underlying dimension table into Power BI. Create a List with that date key column and use it to concatenate into a date member in your MDX.

     

    Regards,