Forum Discussion
Creating a chart with finish time as the value
- 5 years ago
Hi HelenaX ,
You also can use the following m query to calculate duration:
Table.AddColumn(Source,"dunration", each Duration.Minutes([end time]-[start time]))Or use the following measure:
CCP Duration = DATEDIFF(MAX(CCP_STATUS[CCP Start Time]), MAX(CCP_STATUS[CCP Finish Time]), minute)If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
HelenaX , Power Bi standard visual does not show time on the y axis.
You can have time in a minute or second
Time in Min = Time(hour([datetime]) *60 + minute([datetime]) + second([datetime])/60
Thanks amitchandak for providing the information. I will then stop pursuing my original idea. Now since the duration works, I am thinking to generate a different chart using the duration time. I am thinking to generate bars to show the average duration of the program in each country (over all the data available). In addition, I would also like to generate a bar for current day's duration and then compare it with the average duration. Basicaly, the visual will look like the chart for the duration in my original question. But the bars will show average duration with light color in the background and then current day's average to appear on the same bar but in the front. For instance, the average duration for a country is 50, this will be showing as a bar with light color in the background. Today's duration is 40 min, this bar overlaps with the average bar as green color, you can then easily tell that it finished 10 min earlier comparing to the average duration time. On the other hand, if today's duration is 65 min, the extra 15 min will show as 15 min extended red bar from the end of the average bar so you can tell easily that the the duration is longer than the average for 15 min. Do you think this is possible? If so, what measure/columns do I need to create? And which chart is available?