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
Liis
New Member

Sum of duration shown in whole days

Hi, 

 

Just started using Power BI and stumbled upon a problem for which I cannot find a solution. I need to report duration in HH:MM:SS format, but at the moment it shows whole days. 


For example, in Query editor with type duration it shows 0.00:30:00, but in table view it shows 0,034016... and therefore when I try to sum durations in the report, then it calculates the value in whole days instead of format HH:MM:SS.

 

 

 

Would you be able to help me?

1 ACCEPTED SOLUTION

Hi @Liis,


And it helped, but when I make a matrix, then for some rows the total is incorrect. It just shows hours and deducts whole days from the total. 


Here is a good article about how to get the correct row/column total with DAX. Could you go to check if it helps in your scenairo?

 

In addition, here is the idea of adding support for "duration" data type in the report view as in Power Query. You can vote it and add your comments there to improve Power BI on this feature. Smiley Happy

 

Regards

View solution in original post

2 REPLIES 2
Liis
New Member

Hi again, 

 

used this formula: Measure =
VAR DurationRUNNER =
SUM ( 'Tablename'[Duration] )
RETURN
IF (
ROUNDDOWN ( DurationRUNNER; 0 ) > 1;
ROUNDDOWN ( DurationRUNNER; 0 ) * 24
+ HOUR ( DurationRUNNER )
& ":"
& (
MINUTE ( DurationRUNNER ) & ":"
& SECOND ( DurationRUNNER )
);
FORMAT ( DurationRUNNER; "hh:mm:ss" ))

 

And it helped, but when I make a matrix, then for some rows the total is incorrect. It just shows hours and deducts whole days from the total. 

Hi @Liis,


And it helped, but when I make a matrix, then for some rows the total is incorrect. It just shows hours and deducts whole days from the total. 


Here is a good article about how to get the correct row/column total with DAX. Could you go to check if it helps in your scenairo?

 

In addition, here is the idea of adding support for "duration" data type in the report view as in Power Query. You can vote it and add your comments there to improve Power BI on this feature. Smiley Happy

 

Regards

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.