Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

TIme Duration DAX Measure error

Hi Experts

 

I am trying to work out the time difference between the two times and dates .

 

See image of 

129 second is 00:02:09 not 00:02:29 what the second meaure is giving me

 

First Measure

Time Taken in seconds = DATEDIFF(vw_fct_irs_time_taken[timestamp_created], vw_fct_irs_time_taken[timestamp_committed],SECOND)

 

Then convert that to HH:MM:SS - Calculated Column

 

 

 

HH:MM:SS = 
RIGHT ( "0" & INT ( vw_fct_irs_time_taken[Time Taken in seconds] / 3600 ), 2 )
    & ":"
    & RIGHT (
        "0"
            & INT ( ( vw_fct_irs_time_taken[Time Taken in seconds] - INT (vw_fct_irs_time_taken[Time Taken in seconds] / 3600 ) * 3600 ) / 60 ),
        2
    )
    & ":"
    & RIGHT ( "0" & MOD (vw_fct_irs_time_taken[Time Taken in seconds], 3600 ), 2 )