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
Rakshana
Frequent Visitor

Need help with status change of tickets over time

Hi, 

I have data in the following format. A ticket moves across multiple stages over time. Data is collected monthly.

Rakshana_0-1673196334253.png

The status order is Submitted -> Screening -> Approved -> Completed

 

I want to track the flow of tickets. Eg: 30 tickets submitted in Jan -> 15 of which moved into screening in Feb -> 7 approved in March -> 4 completed in April. There might be new submissions every month as well. 

I am able to get a bar chart that shows the count of tickets in each state per month. 

Rakshana_2-1673197115833.png

But how do I show the number of tickets that have changed from the previous month to now in a visual? For example how many moved from submitted to screening from Jan to March? or how many tickets submitted in Jan have been completed by June. 

Any suggestions/ guidance is appreciated. Thank you.

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Rakshana For the first question, you could do something like this:

Number of Changed Tickets PM =
  VAR __Tickets = SELECTCOLUMNS('Table',"__TicketID",[TicketID],"__Status",[Status])
  VAR __PMEOM = EOMONTH(MAX('Table'[DateAsOf]),-1)
  VAR __PMBOM = DATE(YEAR(__PMEOM), MONTH(__PMEOM), 1)
  VAR __TicketsPM = SELECTCOLUMNS(FILTER(ALL('Table'),[DateAsOf] >= __PMBOM && [DateAsOf] <= __PMEOM),"__TicketID",[TicketID],"__Status",[Status])
  VAR __Changed = EXCEPT(__Tickets, __TicketsPM)
  VAR __Result = COUNTROWS(__Changed)
RETURN
  __Result


Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

@Rakshana For the first question, you could do something like this:

Number of Changed Tickets PM =
  VAR __Tickets = SELECTCOLUMNS('Table',"__TicketID",[TicketID],"__Status",[Status])
  VAR __PMEOM = EOMONTH(MAX('Table'[DateAsOf]),-1)
  VAR __PMBOM = DATE(YEAR(__PMEOM), MONTH(__PMEOM), 1)
  VAR __TicketsPM = SELECTCOLUMNS(FILTER(ALL('Table'),[DateAsOf] >= __PMBOM && [DateAsOf] <= __PMEOM),"__TicketID",[TicketID],"__Status",[Status])
  VAR __Changed = EXCEPT(__Tickets, __TicketsPM)
  VAR __Result = COUNTROWS(__Changed)
RETURN
  __Result


Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Thanks a lot @Greg_Deckler! This was helpful 

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.