cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Use a Measure as a Slicer

Seems like this should be simple but no.  I wasn't able to apply the suggestions in this forum so I attached a link to a simple Power BI that shows what I'm trying to do.

I have a table with Customer, State and Amount and a Measure that catogorizes the Priority:

I need a slicer for the Priority,

Any help will be greatly appreciated.

Measure as a Slicer

https://www.dropbox.com/scl/fi/5bjgnv4htsi8n4u4xgmnp/Measure-as-a-Slicer.pbix?rlkey=surjd8sy5ab4vvk9...

2 ACCEPTED SOLUTIONS
Super User

As you can't use the measure as a slicer you need to add the segmentation as a calculated column.

From your sample, I understood that this segmentation is on the customer level.
So you can use dax formula :

Customers_priority = if (CALCULATE(sum(Data[Amount]),ALLEXCEPT('Data','Data'[Customer]))>=50000,"One",
if(CALCULATE(sum(Data[Amount]),ALLEXCEPT('Data','Data'[Customer]))>=10000,"Two","Three"))

And then use it on your slicer

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Super User

Hi,

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
2 REPLIES 2
Super User

Hi,

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Super User

As you can't use the measure as a slicer you need to add the segmentation as a calculated column.

From your sample, I understood that this segmentation is on the customer level.
So you can use dax formula :

Customers_priority = if (CALCULATE(sum(Data[Amount]),ALLEXCEPT('Data','Data'[Customer]))>=50000,"One",
if(CALCULATE(sum(Data[Amount]),ALLEXCEPT('Data','Data'[Customer]))>=10000,"Two","Three"))

And then use it on your slicer

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly