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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
jankiex
New Member

Days Since

Hi

 

I am creating a dashboard for a Service Desk

We receive requests and now and then they can stay open for long.

 

I am looking to create a column to show me some Day Ranges

 

I created a Column called Days Since which shows us how long the request has been open for,

 

Now, I need to create a column to show me these Days in Ranges of;

1. Less than 20 Days open

2. Between 30 and 60 Days open

3. More than 90 Days open

 

Been trying to use the IF function, but I am really not coming right

I tried the below with no luck

 

IF('Tabular Reports (3)'[Days Since]=0 && 'Tabular Reports (3)'[Days Since]<=20, "20 Days", IF('Tabular Reports (3)'[Days Since]<=60, && 'Tabular Reports (3)'[Days Since]>=30, "30-60 Days", IF('Tabular Reports (3)'[Days Since]>=90, "90+ Days)))


Anyone that can help? 

1 ACCEPTED SOLUTION
jankiex
New Member

Aging = sWITCH(
    TRUE(),
    'Aged_Weekly_QA_Report'[Days Since] < 20, "<20 Days",
    'Aged_Weekly_QA_Report'[Days Since] >= 30 && 'Aged_Weekly_QA_Report'[Days Since] <= 60, "30-60 Days",
    'Aged_Weekly_QA_Report'[Days Since] > 90, "90+ Days",
    "Other"
)

View solution in original post

2 REPLIES 2
jankiex
New Member

Aging = sWITCH(
    TRUE(),
    'Aged_Weekly_QA_Report'[Days Since] < 20, "<20 Days",
    'Aged_Weekly_QA_Report'[Days Since] >= 30 && 'Aged_Weekly_QA_Report'[Days Since] <= 60, "30-60 Days",
    'Aged_Weekly_QA_Report'[Days Since] > 90, "90+ Days",
    "Other"
)
parry2k
Super User
Super User

@jankiex are you getting a wrong result or error? What is not working? What is Days Since? Is it a column or a measure?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors