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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
meena16_vibrant
Frequent Visitor

Multiple Slicer selection

Slicer

                AAA

                BBB

               

When I select Slicer AAA, calculation = total value * 10%

When I select slicer BBB, calculation =total value * 0%

 

Suppose total value =100

Table I should get as below. It might be single selection or multi selection. How do I achieve this in measure?

 

AAA

1

BBB

0

 

Measure =

SWITCH(TRUE(),

"AAA" IN ALLSELECTED(Table[coln]),total value * 0.01,

"BBB" IN ALLSELECTED(Table[coln]),total value * 0)

 

I tried above measures but it retrieves 1 for both.(Multi selection)

AAA

1

BBB

1

 

Is there a way to achieve this scenario in measure? Any suggestions will be of great help.

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@meena16_vibrant Try:

Measure =

SWITCH(TRUE(),

"AAA" IN DISTINCT(Table[coln]),total value * 0.01,

"BBB" IN DISTINCT(Table[coln]),total value * 0)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@meena16_vibrant Try:

Measure =

SWITCH(TRUE(),

"AAA" IN DISTINCT(Table[coln]),total value * 0.01,

"BBB" IN DISTINCT(Table[coln]),total value * 0)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi,

I need your help,

 

I have a situation here where I need to show multiple values selected from multiple sicers in a card visual.

multiple values of same slicer should be seperated by ","and multiple values from multiple slicers should be seperated by "|". 

when no values selected from any of the slicers , it should show "Not Selected"

for example, if I select 2017 and 2018 from Year slicer,

result is : 2017,2018   (here "|" is not expecting after the result)

if I select HYD and BZA  from LocID slicer and  2021,2022 from year slicer and Azure-C,Azure-F from CourseID,

result is: HYD,BZA | 2021,2022 |Azure-C,Azure-F

If I select no values from three slicers,

Result is: Not Selected

 

Thanks in advance...

Thanks for the response. It worked.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.