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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Ticket Resolution Rate in prior month

HI,

I have two tables, one that has ticket information (ticket) a date table (date). Within the ticket table is a Ticket_ID column, an open date (that has a relationship with the date table) and a closed date. Both opened and closed dates are in "Date" format.

I have to create a report that provides the prior calendar month's resolution rate. To get the resolution rate for the prior month, I have to determine which tickets were both opened and closed in the previous month  (i.e. since this is Jan, it would be all ticket id's that have an open date in Dec. 2018 and all ticket ids that have an opended and a closed date within the month of Dec. 2018). 

I've been attempting to get this for a few hours now but have been unable to find a solution that works....either using measures or by creating a new table.

 

Thank you in advance

 

Data Sample:

 

Ticket IDOpened DateClosed Date
1Tuesday, October 16, 2018Monday, December 3, 2018
2Monday, November 26, 2018Monday, December 17, 2018
3Thursday, December 6, 2018 
4Thursday, December 6, 2018Tuesday, December 18, 2018
5Thursday, December 13, 2018Thursday, December 20, 2018
6Thursday, December 13, 2018Monday, December 17, 2018
7Thursday, December 13, 2018Thursday, December 20, 2018
8Wednesday, January 9, 2019Thursday, January 10, 2019
9Thursday, January 10, 2019 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please try:

count open tickets =
VAR currentdate =
    TODAY ()
VAR startofpreviousMonth =
    DATE ( IF ( MONTH ( TODAY () ) = 1, YEAR ( TODAY () ) - 1, YEAR ( TODAY () ) ), IF ( MONTH ( TODAY () ) = 1, 12, MONTH ( TODAY () ) - 1 ), 1 )
VAR EndofpriorMonth =
    EOMONTH ( TODAY (), -1 )
RETURN
    CALCULATE (
        COUNT ( Sheet2[Ticket ID] ),
        FILTER (
            ALLSELECTED ( Sheet2 ),
            Sheet2[Closed Date] <> BLANK ()
                && Sheet2[Opened Date] >= startofpreviousMonth
                && Sheet2[Closed Date] <= EndofpriorMonth
        )
    )

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please try:

count open tickets =
VAR currentdate =
    TODAY ()
VAR startofpreviousMonth =
    DATE ( IF ( MONTH ( TODAY () ) = 1, YEAR ( TODAY () ) - 1, YEAR ( TODAY () ) ), IF ( MONTH ( TODAY () ) = 1, 12, MONTH ( TODAY () ) - 1 ), 1 )
VAR EndofpriorMonth =
    EOMONTH ( TODAY (), -1 )
RETURN
    CALCULATE (
        COUNT ( Sheet2[Ticket ID] ),
        FILTER (
            ALLSELECTED ( Sheet2 ),
            Sheet2[Closed Date] <> BLANK ()
                && Sheet2[Opened Date] >= startofpreviousMonth
                && Sheet2[Closed Date] <= EndofpriorMonth
        )
    )

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-yulgu-msft  - Thank you so much!!! This worked perfectly and saved me a lot of time and frusturation.

Greg_Deckler
Super User
Super User

See if my Open Tickets Quick Measure helps:

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thank you, let me give this a try....

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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