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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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