Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello,
Is there anyone who created a datset in Paginated report using Power BI Dax query (from Performance Analyzer)?
Query:
// DAX Query
DEFINE
VAR __DS0Core =
SELECTCOLUMNS(
KEEPFILTERS(
FILTER(
KEEPFILTERS(
SUMMARIZECOLUMNS(
'DimLocation'[Country],
'Action'[Control],
"CountRowsFactAction", CALCULATE(COUNTROWS('Action'))
)
),
OR(
NOT(ISBLANK('DimLocation'[Country])),
NOT(ISBLANK('Action'[Control]))
)
)
),
"'DimLocation'[Country]", 'DimLocation'[Country],
"'FactAction'[Control]", 'Action'[Control]
)
VAR __DS0PrimaryWindowed =
TOPN(501, __DS0Core, 'DimLocation'[Country], 1, 'Action'[Control], 1)
EVALUATE
__DS0PrimaryWindowed
ORDER BY
'DimLocation'[Country], 'Action'[Control]
My question: How can I create a parameter if I use this query? How to write a DAX code included in this query to create a parameter in paginated report?
Solved! Go to Solution.
Use the @ symbol for a parameter and make sure it's mapped in the parameters section.
Here's a simplified example based on your query:
DEFINE
VAR CountryFilter = TREATAS ( { @Country }, 'DimLocation'[Country] )
EVALUATE
SUMMARIZECOLUMNS (
'DimLocation'[Country],
'Action'[Control],
CountryFilter,
"CountRowsFactAction", CALCULATE ( COUNTROWS ( 'Action' ) )
)
More detail in my answer here: https://stackoverflow.com/questions/68820105
Use the @ symbol for a parameter and make sure it's mapped in the parameters section.
Here's a simplified example based on your query:
DEFINE
VAR CountryFilter = TREATAS ( { @Country }, 'DimLocation'[Country] )
EVALUATE
SUMMARIZECOLUMNS (
'DimLocation'[Country],
'Action'[Control],
CountryFilter,
"CountRowsFactAction", CALCULATE ( COUNTROWS ( 'Action' ) )
)
More detail in my answer here: https://stackoverflow.com/questions/68820105
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |