Forum Discussion

dk_24's avatar
dk_24
Helper I
8 years ago
Solved

Dynamic Slicer Selection Calculation

Hi All,

 

SAMPLE Data:

User Sales
U1120
U2100
U395
U4110

     

I Have a slicer with User , Suppose if i select U2 , U2 sales is 100, now i want to compare with the other users 

Ex = Slicer selection U2

100 - (120+95+110)/3 

the difference with the remaing users are -8  .

suppose if i select U4 in Slicer

the output should be 110 - (120+100+95) /3 = -5 

 

Thanks,

DK.

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    8 years ago

    Infact this one to be precise

    =sum(Table1[Sales])-Calculate(AVERAGE(Table1[Sales]),EXCEPT(All(Table1),Allselected(Table1)))

     

3 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    Hello DK

    Try this measure

    =Calculate(AVERAGE(Table1[Sales]),EXCEPT(All(Table1),Allselected(Table1)))

    • Zubair_Muhammad's avatar
      Zubair_Muhammad
      Community Champion

      Infact this one to be precise

      =sum(Table1[Sales])-Calculate(AVERAGE(Table1[Sales]),EXCEPT(All(Table1),Allselected(Table1)))

       

      • dk_24's avatar
        dk_24
        Helper I

        Thanks Zubair.

        it's working fine.