March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, I am querying to a SSAS database with MDX query. I was wondering if it is possible to add a +/- button to change the query dynamically in the report? So if I press -1 then it changes the query with -1 (I use integer datevalue) so that I get yesterdays report.
Solved! Go to Solution.
@jomikk,
You can add slicers in the report page and use slicers to filter your visuals to show yesterday data.
Another option is to add parameter using "Manage Parameters" button in Query Editor , then you are able to enter parameter value by clicking “Edit Queries” ->“Edit Parameters” as described in the following blogs.
http://biinsight.com/power-bi-desktop-query-parameters-part-1/
http://biinsight.com/power-bi-desktop-query-parameters-part2-dynamic-data-masking-and-query-paramete...
Regards,
Lydia
@jomikk,
When you connect to SSAS database using “Import” mode in Power BI Desktop, it is possible to change your query dynamically. You can pass parameter to the MDX source query as described in the following similar threads. Then you are able to enter parameter values and click invoke button to generate expected table.
https://community.powerbi.com/t5/Desktop/Passing-parameters-to-MDX-source-queries/m-p/98738
https://community.powerbi.com/t5/Desktop/Declare-parameters-for-SQL-query-in-Power-BI/td-p/195620
However, if you connect to SSAS database using “Connect Live” mode, it is not possible to change query dynamically.
Regards,
Lydia
Thanks! I am importing, not connecting live. The solutions linked seem like it is only possible to do it in the query editor? Can you add a button on the report page as well?
@jomikk,
You can add slicers in the report page and use slicers to filter your visuals to show yesterday data.
Another option is to add parameter using "Manage Parameters" button in Query Editor , then you are able to enter parameter value by clicking “Edit Queries” ->“Edit Parameters” as described in the following blogs.
http://biinsight.com/power-bi-desktop-query-parameters-part-1/
http://biinsight.com/power-bi-desktop-query-parameters-part2-dynamic-data-masking-and-query-paramete...
Regards,
Lydia
Are you importing or live query?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
90 | |
90 | |
66 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |