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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Hopeisgood1
Helper II
Helper II

Need average days to close tickets and Tickets greater than 30 days - DAX math help

Hi,

 

Bear with me. I am not great at DAX math. 

 

I have 2 formulas I need help with. 

 

First - Over 30 days. I got this far but where am I off? It's not populating the YES/NOW in the column...

 

Over 30 Days = IF(INC[PBI Submit Date].[Date]>=TODAY(),IF(INC[PBI Submit Date].[Date]<=Today(), "yes", "no"))
 
Hopeisgood1_0-1731429952044.png

 

Secondly - Average days to close tickets....my mind is blank on this one....

 

Hopeisgood1_1-1731432117606.png

 

 Thank you for all your help!
2 ACCEPTED SOLUTIONS

Hi Yilong!

 

Thank you! So Close!!!

 

However, what I am now seeing is this...

 

I need to add 3 values - Closed, Resolved, and Cancelled - from the Status column (INC[Status]) to the formula that should filter them. I tried and it's not filtering them out. Below are the Resolved tickets (sigh) I tried the filter into the formula but I am not getting it right at all.

 

Over 30 Days =
IF (
    'INC'[PBI Closed Date] - 'INC'[PBI Submit Date]
        < ( TODAY () - 30 )
        && 'INC'[Status*]<> "Resolved"
        && 'INC'[Status*]<> "Closed"
        && 'INC'[Status*]<> "Cancelled",
     "No",
    "Yes"
)

 

Hopeisgood1_0-1731599081331.png

 

Then I did this and it worked somewhat - 

 

Over 30 Days =
IF (
    'INC'[PBI Closed Date] - 'INC'[PBI Submit Date]
        < ( TODAY () - 30 )
        && 'INC'[Status*]<> "Resolved"
        || 'INC'[Status*]<> "Closed"
        || 'INC'[Status*]<> "Cancelled",
     "No",
    "Yes"
)
 
Hopeisgood1_0-1731602271489.png

 

BUT I cannot get the Yes for those over 30 days for those in Assigned, Pending, and In Progress status.
 
 

 

 

 

View solution in original post

Hopeisgood1
Helper II
Helper II

I figured it out!

 

I had to revamp a couple columns.

 

1st) PBI Aging  

PBI Aging = (TODAY()-INC[PBI Submit Date].[Date])
 
2nd) Over 30 Days
Over 30 Days =
    (IF(INC[PBI Aging] >= 30, "Yes",
    IF(INC[PBI Aging] < 30, "No")))
 
3rd) created a card / filtered out the closed/Cancelled/Resolved tickets and then filtered to YES/Counted by Active tickets
 
Hopeisgood1_0-1731605269552.pngHopeisgood1_1-1731605287663.png

 

 

View solution in original post

8 REPLIES 8
Hopeisgood1
Helper II
Helper II

I figured it out!

 

I had to revamp a couple columns.

 

1st) PBI Aging  

PBI Aging = (TODAY()-INC[PBI Submit Date].[Date])
 
2nd) Over 30 Days
Over 30 Days =
    (IF(INC[PBI Aging] >= 30, "Yes",
    IF(INC[PBI Aging] < 30, "No")))
 
3rd) created a card / filtered out the closed/Cancelled/Resolved tickets and then filtered to YES/Counted by Active tickets
 
Hopeisgood1_0-1731605269552.pngHopeisgood1_1-1731605287663.png

 

 

Hopeisgood1
Helper II
Helper II

Lawd! I accidently hit the Accepted as Solution by mistake!!! How do I take that out??

Fowmy
Super User
Super User

@Hopeisgood1 

You need to add these as calculated column, NOT as measures:

Over 30 Days = IF ( INC[PBI Submit Date].[Date] <  ( TODAY () - 30 ), "Yes", "No" )
Average days to close tickets = INT ( INC[PBI Closed Date].[Date] -  INC[PBI Submit Date].[Date] )






Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

For over 30 days, I am noticing those with NULL  or blank in the closed date that they have been resolved in the past - how do I exclude those closed date nulls with the status or Resolved, Cancelled, and Closed?

 

These are tickets with bad data entry from the past 😤

 

Currently working on the Average days piece as there are some weird things in there and trying to find the root cause of it.

 

Thanks 🙂

Over 30 Days = IF ( INC[PBI Submit Date].[Date] <  ( TODAY () - 30 ) && 
INC[PBI Close Date].[Date] <> Blank()
, "Yes", "No" )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Resolved status fixed...

 

Though why is this still stating YES for some that are not over 30 days for the Closed status? All of these rows you are seeing are in closed status. (Nevermind the PBI Aging as I am working on that one!)

Hopeisgood1_1-1731442414256.png

 

 

 

Hi @Hopeisgood1 ,

I create a table as you mentioned.

vyilongmsft_0-1731566117148.png

So I think you can change your DAX code and you can try this DAX code:

Over 30 Days = 
IF (
    'INC'[PBI Closed Date] - 'INC'[PBI Submit Date]
        < ( TODAY () - 30 )
        && 'INC'[PBI Closed Date] <> BLANK (),
    "No",
    "Yes"
)

vyilongmsft_1-1731566380593.png

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yilong!

 

Thank you! So Close!!!

 

However, what I am now seeing is this...

 

I need to add 3 values - Closed, Resolved, and Cancelled - from the Status column (INC[Status]) to the formula that should filter them. I tried and it's not filtering them out. Below are the Resolved tickets (sigh) I tried the filter into the formula but I am not getting it right at all.

 

Over 30 Days =
IF (
    'INC'[PBI Closed Date] - 'INC'[PBI Submit Date]
        < ( TODAY () - 30 )
        && 'INC'[Status*]<> "Resolved"
        && 'INC'[Status*]<> "Closed"
        && 'INC'[Status*]<> "Cancelled",
     "No",
    "Yes"
)

 

Hopeisgood1_0-1731599081331.png

 

Then I did this and it worked somewhat - 

 

Over 30 Days =
IF (
    'INC'[PBI Closed Date] - 'INC'[PBI Submit Date]
        < ( TODAY () - 30 )
        && 'INC'[Status*]<> "Resolved"
        || 'INC'[Status*]<> "Closed"
        || 'INC'[Status*]<> "Cancelled",
     "No",
    "Yes"
)
 
Hopeisgood1_0-1731602271489.png

 

BUT I cannot get the Yes for those over 30 days for those in Assigned, Pending, and In Progress status.
 
 

 

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.