Forum Discussion
Average Time in chart
- 7 years ago
Hi, I've just had a look at your pbix.
The Duration column won't chart properly because it doesn't have the correct datatype. It is set as Time which is not correct, it needs to be a decimal or whole number. That means the calculation of Duration needs to change. Use DATEDIFF and decide which units you want (HOURS, MINUTES or SECONDS).
You will then be able to chart Date against Average Duration. You might have to write a measure to alter the average calculation because powerbi will not throw away the line with 0 duration.
Hello!
Duration of John on 10 nov is 10 (19-9)
Duration of Mary on 10 nov is 8 (19-11)
Duration of Bill in fact is 0, so we miss it
So average duration is 9 ((10+8)/2)
OK, now i went trough first part simply with group by https://dropmefiles.com/B9rGs
now i have correct values, but still can't understand how to make a chart with X and Y
- HotChilli7 years agoCommunity Champion
Hi, I've just had a look at your pbix.
The Duration column won't chart properly because it doesn't have the correct datatype. It is set as Time which is not correct, it needs to be a decimal or whole number. That means the calculation of Duration needs to change. Use DATEDIFF and decide which units you want (HOURS, MINUTES or SECONDS).
You will then be able to chart Date against Average Duration. You might have to write a measure to alter the average calculation because powerbi will not throw away the line with 0 duration.