Forum Discussion
Need Slicer Based on Percentage using Measure
Hi Anonymous
Slicers in Power BI can only be based on columns, not measures. Since your classification logic is written as a measure, it cannot be directly used in a slicer, causing the issue you're seeing.
Solutions:
If the Classifications Are Static:
Use a calculated column with your classification logic:
DAX
Copy code
ClassificationColumn =
IF(Append_WIP[Percentage04] = 0 || Append_WIP[Percentage04] < 0.4, BLANK(),
IF(Append_WIP[Percentage04] > 0.4 && Append_WIP[Percentage04] < 0.55, "Attention Needed",
IF(Append_WIP[Percentage04] > 0.55 && Append_WIP[Percentage04] < 0.65, "Monitor The Account",
IF(Append_WIP[Percentage04] > 0.65 && Append_WIP[Percentage04] < 1, "Action Needed",
IF(Append_WIP[Percentage04] > 1, "Value > 100%"
)))))
Use this column in your slicer.
If the Classifications Are Dynamic:
When the logic is based on measures and needs to be dynamic, you’ll need to create a table with names and ranges (e.g., Min %, Max %, Classification). This table will serve as the base for segmentation. Check out this video explaining how to implement dynamic segmentation in Power BI.
https://www.youtube.com/watch?v=FDa0I3J3h-c
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.