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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
chad_lenny
Regular Visitor

Sort Slicer Visual that uses IF Formulas

I am trying to sort my Slicer so it shows as 0-.5, then .5-1, then 1-2 etc. See exampe Formula the Slicer is using and what is currently shows.

Tenure Group = IF(EMPLOYEE_EDV[Tenure]<.5,"0-.5",IF(EMPLOYEE_EDV[Tenure]<1,".5-1",IF(EMPLOYEE_EDV[Tenure] <2, "1-2", IF(EMPLOYEE_EDV[Tenure]<4,"2-4",IF(EMPLOYEE_EDV[Tenure]<6,"4-6",IF(EMPLOYEE_EDV[Tenure]<10,"6-10","More Than 10")))))). 

 

chad_lenny_0-1698951294137.png

 

1 ACCEPTED SOLUTION

@chad_lenny ,
Make it 0.0-0.5 instead of 0-0.5. The values are formatted as TEXT and hence 0 comes later than 0.5 according to ASCII, hence this is happening.

Result:
Anand24_0-1698953239257.png

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

 

View solution in original post

3 REPLIES 3
Anand24
Super User
Super User

Hi @chad_lenny ,
Instead of .5, type 0.5 and it will auto-sort itself to achieve the way yo want it right now.

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

I tried that and it still sorts the 0.5-1 before the 0-0.5. 

 

chad_lenny_0-1698952893379.png

 

@chad_lenny ,
Make it 0.0-0.5 instead of 0-0.5. The values are formatted as TEXT and hence 0 comes later than 0.5 according to ASCII, hence this is happening.

Result:
Anand24_0-1698953239257.png

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

 

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors