Forum Discussion
From Timestamp to mm:ss
Hi All,
I have a column in my dataset displaying the amount of time somebody stays on a call.
Unfortunately the data type is: Time and it appears in the following way:
I would like to have it in the following format: mm:ss
Additionally, I would like to sum them in order to have a aggregate number per person.
Any ideas on how to do it?
Hi Anonymous ,
You need a calculated column to transform the date column to "mm:ss":
Column = FORMAT('Table'[Time],"nn:ss")then you will see as below:
Then you need to create a measure to calculate the total minumtes for each person( if the time happens on the same day,otherwise you need to calculate the date differences between,then transformed to minutes or hours or seconds as you need):
Measure 2 = var a=SUMX('Table',HOUR('Table'[Time])) var b=SUMX('Table',MINUTE('Table'[Time])) var c=SUMX('Table',SECOND('Table'[Time])) return a*60+b+c/60And you will see:
For the related .pbix file,pls click here.
Best Regards,
Kelly
2 Replies
- v-kelly-msft
Community Support
Hi Anonymous ,
You need a calculated column to transform the date column to "mm:ss":
Column = FORMAT('Table'[Time],"nn:ss")then you will see as below:
Then you need to create a measure to calculate the total minumtes for each person( if the time happens on the same day,otherwise you need to calculate the date differences between,then transformed to minutes or hours or seconds as you need):
Measure 2 = var a=SUMX('Table',HOUR('Table'[Time])) var b=SUMX('Table',MINUTE('Table'[Time])) var c=SUMX('Table',SECOND('Table'[Time])) return a*60+b+c/60And you will see:
For the related .pbix file,pls click here.
Best Regards,
Kelly
- amitchandak
Super User
you can get in mm:ss using the format
format(column,"mm:ss")
But that might not solve the purpose.
Refer
https://community.powerbi.com/t5/Desktop/Sum-of-H-MM-SS/td-p/124007