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
Could someone please tell me how to create a measure to calculate a time duration? I was able to calculate the "CCP Duration" by creating a new column and use below formula:
So, how do I create a measure to simply replicating the formula of
CCP Duration = DATEDIFF(CCP_STATUS[CCP Start Time], CCP_STATUS[CCP Finish Time], minute)
I don't know about DAX and found it difficult to do some pretty simple calculations in PowerBI.
I would really appreciate your help.
- v-deddai1-msft5 years ago
Community Support
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
- HelenaX5 years ago
Helper I
v-deddai1-msft Yes, this method works too! The MAX function intially gave me an impression that it is giong to calculate the maximum value of the whole Start Time column and then subtract it from the maximum value of the whole Finish Time column. It is to my pleasant surprise that it is calculating row by row. So the MAX here doesn't really mean it is calculating the maximum value of the whole column? Any reason why it is called MAX then?