Forum Discussion
Duration as Average
Hello,
I had below table to which I transformed to duration by dividing it to 86400.
| Department | Ticket | Duration |
| Finance | 1 | 12783 |
| HR | 2 | 34542 |
| HR | 3 | 92346 |
I got below after dividing in Power Query
but when I try to visualize I get duration as decimal. I want to show average duration but firstly it is showing decimal secondly I am unable to show it as average duration. How to do it?
Kindly help
Hi Hamdan1234,
It seems that calculate average duration firstly will easy to come out the result you want. import the table from data source , close and apply directly. Power Query editor is used to clear and shape the data and not good at calculation.
1 create a measure:
How many days = DIVIDE( AVERAGE('Table'[Duration]),86400)2 drag Departmen, Measure in the table visual or bar chart .result:
Is the result decimal you want ? if I misunderstood you please let me know.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- VahidDMSuper User
Hi Hamdan1234 ]
Please see these links:
https://community.powerbi.com/t5/Desktop/Showing-average-duration-in-bar-chart/m-p/1907489
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
- mahoneypatMicrosoft Employee
Please see this article/videos on how to best handle durations in Power BI.
Calculate and Format Durations in DAX – Hoosier BI
Pat
- v-chenwuz-msftCommunity Support
Hi Hamdan1234,
It seems that calculate average duration firstly will easy to come out the result you want. import the table from data source , close and apply directly. Power Query editor is used to clear and shape the data and not good at calculation.
1 create a measure:
How many days = DIVIDE( AVERAGE('Table'[Duration]),86400)2 drag Departmen, Measure in the table visual or bar chart .result:
Is the result decimal you want ? if I misunderstood you please let me know.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.