Forum Discussion

jankiex's avatar
jankiex
Regular Visitor
2 years ago
Solved

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? 

  • 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"
    )

2 Replies

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

  • jankiex's avatar
    jankiex
    Regular Visitor
    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"
    )