Forum Discussion
Format for reporting time spent
- 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
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
- KirstyMacKinlay7 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-msft7 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