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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

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