Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Mhscmp100
Regular Visitor

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.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Mhscmp100 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1689822491322.png

2. create a new column with below dax formula

Time Variance =
VAR val =
    IF ( [arrival time] < [departure time], [arrival time] + 1, [arrival time] ) - [departure time]
RETURN
    FORMAT ( val, "hh:nn" )

vbinbinyumsft_1-1689822554505.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Mhscmp100 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1689822491322.png

2. create a new column with below dax formula

Time Variance =
VAR val =
    IF ( [arrival time] < [departure time], [arrival time] + 1, [arrival time] ) - [departure time]
RETURN
    FORMAT ( val, "hh:nn" )

vbinbinyumsft_1-1689822554505.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.