cancel
Showing results for 
Search instead for 
Did you mean: 
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
Super User
Super User

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
Super User
Super User

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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors