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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Hamdan1234
Helper III
Helper III

Measure as Slicer

Hello,

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

asffsfssf.PNG

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
dfsfsfsff.PNG
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 3
v-shex-msft
Community Support
Community Support

Hi @Hamdan1234,

Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Hamdan1234
Helper III
Helper III

Hello @amitchandak ,

I have used the same video but still not filtering. It would be helpful if I could send you tthe file to you and if you can see the problem in it.

amitchandak
Super User
Super User

@Hamdan1234 , Try to use Selected Measure in visual it should work

 

if datatype is number 

 

Selected Measure = SELECTEDVALUE(Slicers[Code],1)
SlicerBest =
SWITCH(
[Selected Measure],
1, [Sum of Amount 2],
2, [Sum of Quantity 2]
)

 

 

refer if needed

https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors