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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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