Forum Discussion

KirstyMacKinlay's avatar
KirstyMacKinlay
New Member
7 years ago
Solved

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 ...
  • v-lili6-msft's avatar
    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