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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
bouyazbekj
Helper I
Helper I

Help with Switch Function

Hello everyone. 

 

Im the table attached I want to create a "Status" column where I want a switch function to group days outstanding into 4 categories.. 0-50 days, 51-75 days, 76-90 days, 91+ days. See below for example 

 

Invoice numberDays outstandingStatus
20460160-50 Days
20459250-50 Days
2045832 
2045748 
2045650 
204555551-75
2045458 
2045359 
2045270 
2045175 
204507776-90 Days
204499076-90 Days
204489291+ Days
2044799 
2044699 
20445105 
1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

Column = switch(TRUE(), Table1[Days outstanding] < 51, "0 - 50 Days",
                        Table1[Days outstanding] < 76, "51 - 75 Days",
                        Table1[Days outstanding] < 91, "76 - 90 Days", "91 + Days")

Please test it because I just bashed it out without doing so

View solution in original post

1 REPLY 1
HotChilli
Community Champion
Community Champion

Column = switch(TRUE(), Table1[Days outstanding] < 51, "0 - 50 Days",
                        Table1[Days outstanding] < 76, "51 - 75 Days",
                        Table1[Days outstanding] < 91, "76 - 90 Days", "91 + Days")

Please test it because I just bashed it out without doing so

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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