Forum Discussion

Hamdan1234's avatar
Hamdan1234
Icon for Helper III rankHelper III
4 years ago

Measure as Slicer

Hello,

I wanted to slice the data based on Measures. I had this table below. 

I summed up Quantity and Amount and made a mesure as 

Sum of Amount 2 = SUM(Table[Order_Amount])
Sum of Quantity 2 = SUM(Table[Quantity])
Then I made a new table as below by entring the data in Power bi
Then I used below function:
Selected Measure = SELECTEDVALUE(Slicers[Code],1)
SlicerBest =
SWITCH(
[Selected Measure],
"1", [Sum of Amount 2],
"2", [Sum of Quantity 2]
)
But my slicer are not filtering still. The values does not change and remain same . What should I do now. Need Help from your side.
Thanks

3 Replies