Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
How to use multiple value parameter in dax query. I am creating dataset for my cascading dropdown. For single value following query is working
EVALUATE
UNION (ROW("Sector","All"),
CALCULATETABLE(
DISTINCT('Rollup'[SectorName]),
'Rollup'[DivisionName] = @Division
))
but I need to use it for multiple values selected in Division which is not working
EVALUATE
UNION (ROW("Sector","All"),
CALCULATETABLE(
DISTINCT('Rollup'[SectorName]),
'Rollup'[DivisionName] IN (@Division)
))
Any idea or help will be appreciated.
@shzaidi , try like
EVALUATE
UNION (ROW("Sector","All"),
CALCULATETABLE(
DISTINCT('Rollup'[SectorName]),
'Rollup'[DivisionName] IN { @Division}
))
or
EVALUATE
UNION (ROW("Sector","All"),
CALCULATETABLE(
DISTINCT('Rollup'[SectorName]),
'Rollup'[DivisionName] IN @Division
))
The first suggestion syntax is correct but results are not. Selecting only one division it shows its sectors but selecting two or more divisions no sectors show up.
@shzaidi check if values or allselected works
'Rollup'[DivisionName] IN values( @Division)
'Rollup'[DivisionName] IN allselected( @Division)
Both has syntax errors, not accepting parameter value as table values even multiple values check in parameter is on.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
42 | |
39 | |
19 | |
19 |