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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.