Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
shzaidi
Helper I
Helper I

Using Multiple value Parameters in DAX query

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.

 

4 REPLIES 4
amitchandak
Super User
Super User

@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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors