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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Madyshq
New Member

Calculate open tickets and the one with max duration at the moment of given dates

I have read some post related to ticket systems, none of them have helped me. I have a common dataset called ITS, with a Key, created_date and resolved_date; if the ticket is unsolved, resolved_date is blank. I calculate the number of open tickets  in a set of dates. For example, every Thursday since the ticket systems started. The dates table would be like this

Thursdays = FILTER('Date',WEEKDAY('Date'[Date])=5 || 'Date'[Date]=TODAY())
 And I calculate the number of open tickets like this:
Open = CALCULATE (
        COUNT ( ITS[Key]),
        FILTER(ALL(ITS),
            ITS[Created] <=[Date]
                && ( ITS[Resolved] > [Date]
                        || ISBLANK ( ITS[Resolved] )
     )  )   )
But I also need to know which ticket had more time opened in every given date, and it's duration. I am an amateur in DAX, have tried some approaches, all of the unsuccessful. 
I hope some of you can help me. Thanks for the time!

 

2 REPLIES 2
amitchandak
Super User
Super User

Having your report  as an example. I want to know, in a given list of dates(lets say weekly), which has been the active worker that has worked for longer time, and for how long.

Like:

January 4th- Jonh Doe, 1020 days

January 11th-  Jonh Doe, 1027 days

January 18th- Mary Ann, 980 days (John left the company)

...

Every 7 days till the last date in the dataset- Person- How long have been working

 

It makes more sense with tickets than workers, but I hope you have an idea. I have the list of the dates , it should be a column in a new table or something, and make the calculations having that column in consideration.

Thank you very much!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors