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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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