Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have been facing this issue for quite a while. I went through some solutions in this forum and they did not serve my purpose.
My requirement is to not only represent time on each row, I have to aggregate total duration for the selected time range as well (selected on slicers) which can be a day, week(s) or month(s).
I have done the following to serve my purposes - I broke down calculation to Hours, minutes and seconds and then represent in format to be able to serve my purpose.
MEASURES -
CALLTIMES = SUM(DURATIONINSECONDS)
HRS = TRUNC([CALLTIMES]/3600)
MINS = TRUNC((([CALLTIMES]/3600)-[HRS])*60,0)
SECS = TRUNC((((([CALLTIMES]/3600)-TRUNC([CALLTIMES]/3600))*60)-[MINS])*60)
TIMING = IF(LEN([HRS])=1,"0"&[HRS],[HRS])&":"&IF(LEN([MINS])=1,"0"&[MINS],[MINS])&":"&IF(LEN([SECS])=1,"0"&[SECS],[SECS])
This works perfectly for me for any selected time range, whether it is a day/month or months/week or weeks. I would not have to take a long route if there was formatting available in Power BI visuals, like we custom format in excel = [h]:mm:ss
I will he happy to know an easier solution if available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.