Forum Discussion
KirstyMacKinlay
7 years agoNew Member
Format for reporting time spent
Hi I have a report pulled from a spreadsheet which lists time spent by users in a decimal format. i.e. 0.08 = 5mins This means that the time spent report displays in decimal, but this does not ...
- 7 years ago
hi, KirstyMacKinlay
You could try this formula as below:
Measure = var h=INT([SUMTIME]/60) return h&"h"&([SUMTIME]-h*60)&"minte"
or
Measure 2 = VAR h = INT ( [SUMTIME] / 60 ) RETURN IF ( ( [SUMTIME] - h * 60 ) = 0, h & "h", h & "h" & ( [SUMTIME] - h * 60 ) & "minte" )Note: SUMTIME = CALCULATE(SUM(Table2[time spent]))
Result:
Best Regards,
Lin
KirstyMacKinlay
7 years agoNew Member
Hi Lin
Thanks, that looks like it should work, but I am finding that I get the same message as I got yesterday from the other suggestion which says "The value for 'SUMTIME' cannot be determines. Either 'SUMTIME' Doesn't exist, or there is no current row for a column named 'SUMTIME'
However, I do have a column for SUMTIME. I am not able to pick up any of my columns?
Thanks
Kirsty
v-lili6-msft
7 years agoCommunity Support
hi, KirstyMacKinlay
SUMTIME is a measure, not a column.
SUMTIME = CALCULATE(SUM(Table2[time spent]))
You should learn difference between measure and column first.
here is a demo pbix, please try it.
Best Regards,
Lin