Forum Discussion
divide time by distance
Hi,
how can I divide sum(time)/sum(distance) to get average in time format?
Thanks,
Alex
Hi Sasha,
check this blog maybe can lead you to the format you need.
https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486
Regards,
MFelix
3 Replies
- MFelixSuper User
Hi Sasha,
Power BI although shows a time as duration when you put that into a visual or make averages it's treated like decimal so you will get a decimal value you need to format your measure to a time, but be aware that making this will make your measure as text and you you will not be abble o use it in a chart as an axis, just cards or tables.
Average Time = FORMAT (SUM(Table[Time]) / SUM(Table[Distance]); "hh:mm:ss")
Regards,
MFelix
- SashaHelper III
I see,
is there a way I can present it on a chart (axis will be dates of runs and y's will be average pace in a clear format of minutes?)
- MFelixSuper User
Hi Sasha,
check this blog maybe can lead you to the format you need.
https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486
Regards,
MFelix