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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
tksnota
Post Patron
Post Patron

Need Slicer Based on Percentage using Measure

Hi 

 

I had created a table with Difference and Percentage using Measures

 

I wanted to have slicer with the classifications based on the values from the dax but the outcome proved different as shown from screenshot 2.

 

Every line items are duplicated and I'd got numerous instead of single classifications

 

Any help will be appreciated

 

Thanks...tksnota...

 

Classification05 =
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%"
)))))

 

tksnota_0-1732664340637.png

 

tksnota_1-1732664729113.png

 

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @tksnota 

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.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
rajendraongole1
Super User
Super User

Hi @tksnota -you should use a calculated column instead of a measure for your classifications

replace with following calculated column 

Classification05 =
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%"
)))))

 

the above logic resolves by making them suitable for use in slicers. 

 

I hope this works. 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi,

 

I used the 2 Codes and both had the same results.

 

Screenshot 1 should only showed  Action Needed but it also contained Attention Needed plus blank.

 

tksnota_0-1732705698209.png

 

Screenshot 2: How can I put a comment for Infinity "No PO With Cost" and NaAn "No PO, No Cost"

tksnota_1-1732705771166.png

 

Screenshot 3 should only showed "Attention Needed" but also produced blanks

 

tksnota_2-1732706099476.png

 

Thanks...tksnota...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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