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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Vallirajap
Resolver III
Resolver III

Multi Select Slicer

Hi Team,


I stuck to one scenario. which is when I select more than one in a slicer, it is not working. Below, I list out the details.

 

I have one disconnected table, like below.

Vallirajap_0-1721910313037.png

using this table to control a measure using dax

1. Based on grade I have 1 measure [MaxSalaryByGrade].
2. Based on the function, I have 1 measure [MaxSalaryByFunc].
3. Based on the OU I have 1 measure [MaxSalaryByOU].

 

Now I create another measure to interact with the measure using the above table, like Below.

Max = SWITCH( TRUE(),
             SELECTEDVALUE('Currency'[Index]) =4, [MaxSalaryByGrade],
             SELECTEDVALUE('Currency'[Index]) =5, [MaxSalaryByFunc],
             SELECTEDVALUE('Currency'[Index]) =6, [MaxSalaryByOU])

Now the measure will interact perfectly with the above table. When I try to add on another one, like when I click "Grade and OU" in a slicer, at the same time, the Max measure displays another measure [MaxSal_G&O].
So that I can rewrite the query below,

Max =  SWITCH( TRUE(),
                 SELECTEDVALUE('Currency'[Index]) = 4 && SELECTEDVALUE('Currency'[Index]) = 6, [MaxSal_G&O],
                 SELECTEDVALUE('Currency'[Index]) =4, [MaxSalaryByGrade],
                 SELECTEDVALUE('Currency'[Index]) =5, [MaxSalaryByFunc],
                 SELECTEDVALUE('Currency'[Index]) =6, [MaxSalaryByOU])

but this measure does not display any value. why it began like this. 
how to achieve this goal.

 

Thanks in advance.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Vallirajap , try like

Max = SWITCH( TRUE(),
countrows(interset(values('Currency'[Index]), {4,6})) =2, [MaxSal_G&O],
SELECTEDVALUE('Currency'[Index]) =4, [MaxSalaryByGrade],
SELECTEDVALUE('Currency'[Index]) =5, [MaxSalaryByFunc],
SELECTEDVALUE('Currency'[Index]) =6, [MaxSalaryByOU])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Vallirajap , try like

Max = SWITCH( TRUE(),
countrows(interset(values('Currency'[Index]), {4,6})) =2, [MaxSal_G&O],
SELECTEDVALUE('Currency'[Index]) =4, [MaxSalaryByGrade],
SELECTEDVALUE('Currency'[Index]) =5, [MaxSalaryByFunc],
SELECTEDVALUE('Currency'[Index]) =6, [MaxSalaryByOU])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.