Forum Discussion
Subtract Time Entries
- 5 years ago
A measure would be best practice (https://docs.microsoft.com/en-us/dax/average-function-dax)
However, you may look to just use the standard aggregation facility.
https://docs.microsoft.com/en-us/power-bi/create-reports/service-aggregates
Create a bar chart.
x = Responder Type
y = response time
click on the values well and change the value from sum to average.
If I have answered your question please mark my post as the solutiuon. If any of my posts helped please 'like' them. Appreciate the Kudos.
Thanks
Anonymous , Please try as a new column
new column =
var _min = minx(filter(Table, [Event Id] = earlier([Event Id])),[Notified Separation])
var _max = maxx(filter(Table, [Event Id] = earlier([Event Id])),[On Scene Separation])
return
_max - _min
new column =
var _min = minx(filter(Table, [Event Id] = earlier([Event Id])),[Notified Separation])
var _max = maxx(filter(Table, [Event Id] = earlier([Event Id])),[On Scene Separation])
return
if( not(isblank([Notified Separation])), _max - _min , blank())
- Anonymous5 years agoNot applicable
I'm at a loss for where to begin with this and I don't know if what I'm asking is even possible. Here is what I'm trying to accomplish;
My final result is going to be what I'm going to call Avg Response Time. This will be the difference of the OnScene time minus the Notified time for a common Event Id, Responder Id, and Responder Type. I then want to be able to average the result based on certain date ranges which I imagine can be controlled by a slicer.
Here is snippet of my raw data. Using Event Id 468739 as an example, the Responder Id 5943, Responder Type Motorist Assist, yields an OnScene value of 4/1/2020 4:28 and an Notified value of 4/1/2020 4:12. The calculation will be OnScene - Notified (4/1/2020 4:28 - 4/1/2020 4:12).
Here for 468788 the return will be Responder Id 5627, Responder Type Motorists Assist, OnScene - Notified (4/1/2020 10:20 - 4/1/2020 10:07)
Thanks again for reviewing my request and let me know if you need any additional information.