Forum Discussion
Parameters in Report Builder (DAX query copied from Performance Analyzer)
Experiment with the DAX query editor by adding removing parameters. This looks like a reasonable article: https://www.mssqltips.com/sqlservertip/5865/sql-server-reporting-services-report-builder-with-dax-query-support/
Hi - I had found that article as well, but I can't nail down the syntax to add the parameters in the DAX query. This is what I just tried and it's incorrect.
JG
- jgray726 years agoHelper II
I've also tried playing around with the @, but it won't work either.
JG
- d_gosbell5 years agoSuper User
So one way to do this is to add a filter to your visual in Power BI for the Brand and Season. This will add an "_DS0FilterXXX" variable to your query and inject it into the appropriate place in the SUMMARIZECOLUMNS expression.
So if you set a Brand filter of "XYZ" and a season filter of "Winter" the you would just need to find these two strings in the query you copy from the Performance Analyzer and then replace the hard coded values with a reference to @Brand and @Season (or you could use the Parameters!Brand.Value string expression approach)
- Jdokken5 years agoHelper III
When I try changing the "APR-21" to @YearMonth, I get a message saying the parameter is not declared.
VAR __DS0FilterTable3 = TREATAS({"APR-21"}, 'Period'[GL Period])