Forum Discussion

Mhscmp100's avatar
Mhscmp100
Regular Visitor
3 years ago
Solved

Need Help in time intelligence functions

Hi Guys,

Does anyone know how to calculate time variance exactly as we calculate it in Excel? excel provide an option of the 1904 data system so power bi also provides the same or not?  

 

For example;

I have 2 times available in 2 different columns with names as;

actual departure time 21:00

actual arrival time 00:36

time variance = actual arrival time  - actual departure time 

time variance = 00:36 - 21:00

power bi shows the output as 20:24 instead of 03:36 which is shown in Excel by formatting the 1904 data system.

 

 

  • Hi,

     using both time and duration you can add this column
    if[Column2]<[Column1] then [Column2]-[Column1] + #duration(0,24,0,0) else [Column2]-[Column1]

    If this post is useful to help you to solve your issue consider giving the post a thumbs up 

     and accepting it as a solution !

     

2 Replies

  • olgad's avatar
    olgad
    Resident Rockstar

    Hi, you van do the diffdate function in minutes and then divide by 60. 

  • Hi,

     using both time and duration you can add this column
    if[Column2]<[Column1] then [Column2]-[Column1] + #duration(0,24,0,0) else [Column2]-[Column1]

    If this post is useful to help you to solve your issue consider giving the post a thumbs up 

     and accepting it as a solution !