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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Nazeem81
Helper I
Helper I

Values time duration not coming correctly

i,

 

I have an excel file with time duration date per sales person, but when I import the excelfile to power BI and change the time duration to data type time, the values for time duration between the data in Excel and Power BI do not always match. See example below, In Excel it shows 0:00:51 but in Power BI 00:00:50, why is that?

 

 

From Excel

exempel excel.PNG

 

 

 

 

From Power BI

exempel fel tid.PNG

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @Nazeem81,

 

In my test, the time value is not changed after loading into Power BI desktop.

2.PNG1.PNG

 

In your scenario, please check whether the data coming is correct in Query Editor mode. I think the wrong time duration displayed in visual is returned by your formula.

 

Below is my test, please have a look at.

Duration = HOUR ( Test5[Time] )&":"&MINUTE(Test5[Time])&":"&SECOND(Test5[Time])

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HI @v-yulgu-msft,

 

I noticed that in the query editor the time duration is with decimals.  See picture below. When I use my calculated measure in the report view the value is not coming correct due to the decimal issue. How can I solve this?

 

duration issue.PNG

 

Nazeem81
Helper I
Helper I

Anyone please?

Nazeem81
Helper I
Helper I

I have added a link to the excel file im using (http://www.filedropper.com/januaritidrapport). Im trying to summarize the the column "Overksam tid" by using the forrmula below, but as mentioned in previous mail it's not coming correct in Power BI.

 

Sum Overksam tid = VAR TotalSeconds = SUMX ( 'Tiddata'; HOUR ( 'Tiddata'[Overksam tid] )
* 3600 + MINUTE ( 'Tiddata'[Overksam tid] ) * 60 + SECOND
( 'Tiddata'[Overksam tid] ) ) VAR Hors = TRUNC
( TotalSeconds / 3600 ) VAR Mins = TRUNC
( MOD ( TotalSeconds; 3600 ) / 60 )
VAR Secs = MOD ( TotalSeconds; 60 )
RETURN IF ( Hors < 10; "0" & Hors; Hors )
& ":" & IF ( Mins < 10; "0" & Mins; Mins ) & ":" & IF ( Secs < 10; "0" & Secs; Secs )

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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