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
Anonymous
Not applicable

DAX to display measure values as per multiple values selected on a slicer

Hello brilliant community,

 

I need help to figure out how can I display measure values as per slicer selections: Here is my case-

 

'Category' is the report slicer.  If 'A' & 'B' are selected then measure 'Score of A& B' should display calculated values but 'Score of A&C' should display blank or zero. Similarly If 'A' & 'C' are selected then measure 'Score of A&C' should display calculated values but 'Score of A&B' should display blank or zero.

 

 

Category 
  
A 
B 
C 
  
  
Score of A & BScore of A & C
58
69
70
2310

 

Thanks in advance.

Meena

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

To create a measure as below.

 

Measure = var _sele = CONCATENATEX(category,category[Category],"&")
return
if(_sele="A&B",[Score of A & B],if(_sele = "A&C",[Score of A & C]))

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

To create a measure as below.

 

Measure = var _sele = CONCATENATEX(category,category[Category],"&")
return
if(_sele="A&B",[Score of A & B],if(_sele = "A&C",[Score of A & C]))

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

@v-frfei-msftworks perfectly!! Thanks heaps Smiley Happy

Nishantjain
Continued Contributor
Continued Contributor

Hi

Use the Switch function to create a new measure. Check the link below

https://www.fourmoo.com/2017/11/21/power-bi-using-a-slicer-to-show-different-measures/

Thanks
Anonymous
Not applicable

Thanks for the link @Nishantjain . It works if only one value is selected on the slicer,  my requirement is multiple values selection on the slicer. Any suggestions?

 

Thanks,

Meena 

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!

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.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.