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.
I have a change log record containing (3) columns:
"TicketNumber", "ChangedWhen", "Status"
Each "TicketNumber" will appear in multiple records.
Each record can have 1 of 6 "Status" and a date and time that the "Status" changed.
The 6 statuses are not used in constant succession so the ticket may trasition from and back to statuses as seen in the example below.
We are trying to calculate the duration in minutes between the first InProcess "ChangedWhen" record and the last Committed "ChangedWhen" record for each "TicketNumber".
Any suggestions?
Solved! Go to Solution.
hi, @Anonymous
You could use DATEDIFF Function to create a measure
Measure = var _firstInProcess =CALCULATE(MIN('Table'[ChangedWhen]),'Table'[Status]="In Process") var _lastCommitted=CALCULATE(MAX('Table'[ChangedWhen]),'Table'[Status]="Committed") return DATEDIFF(_firstInProcess,_lastCommitted,MINUTE)
Then drag TicketNumber and the measure into a table visual.
Best Regards,
Lin
hi, @Anonymous
You could use DATEDIFF Function to create a measure
Measure = var _firstInProcess =CALCULATE(MIN('Table'[ChangedWhen]),'Table'[Status]="In Process") var _lastCommitted=CALCULATE(MAX('Table'[ChangedWhen]),'Table'[Status]="Committed") return DATEDIFF(_firstInProcess,_lastCommitted,MINUTE)
Then drag TicketNumber and the measure into a table visual.
Best Regards,
Lin
Hey,
please provide an Excel file with some sample data, upload the file to onedrive or dropbox and share the link.
I wonder if each ticket has also a "committed state"?
What is your expected result if there is no "Committed" state?
Regards,
Tom
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |