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
Any chance you can could maybe use power query to reshape your data? It sounds like for this specific report you might be better off having the times in different columns?
- Anonymous5 years agoNot applicable
I appreciate you taking a look at this. I'm new to coding in Power BI but I feel like this is something can be accomplished.
I can narrow it down to the following...any suggestions for the next step?
- Carmichael5 years agoAdvocate III
I am not sure why but I'm really struggling to post anything here.
hopefully this works....
- Carmichael5 years agoAdvocate III
Is it working now?
I have screen shots to show you but let me see if I can just post the text first.
1. merge the event and responder columns to create a unique ID
2. pivot the action putting it into columns. Ensure that under advanced the response time is not aggregated.
that will get your times into columns by action.
3. Select the columns you want to subtract. On ribbon under add column, click on time (the clock) and subtract. That should give you the difference value.
note if one of the times isn't there then it doesn't return a result. Which is what I think you want.
4. close and load into power bi.
5. Build dax measure for average... you may even be able to get away with just putting the difference value into the visual and then changing to an average in the fields well. Not best practice but if gives you what you need then tick.