Forum Discussion

meena16_vibrant's avatar
meena16_vibrant
Frequent Visitor
3 years ago
Solved

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.

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    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)
    • RAJRANJITHBROS's avatar
      RAJRANJITHBROS
      Frequent Visitor

      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...