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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
YcnanPowerBI
Helper II
Helper II

Matrix Subtotals with HH:MM:SS over 24 HHs

Hello all - I am back 🙂  I have a matrix table where I am summing time duration through a measure(also shown).  My issue is anything over 24 hours is not subtotaling or totaling correctly.  I have tried this so many ways, but can't figure out to make it work.  Any help would be greatly appreciated!  

 

 

Nresendes_0-1706671865612.png

 

2 REPLIES 2
Anonymous
Not applicable

Hi @YcnanPowerBI 

 

Maybe you can try this:

I create a sample date:

vzhengdxumsft_1-1706777352010.png

 

Then create a measure:

Measure = 
	CONCATENATE(
		DATEDIFF(
			DATE(1899, 12, 30),
			SUM('Table (2)'[time]),
			HOUR
		),
		CONCATENATE(
			":",
			FORMAT(
				SUMX(
					ALLSELECTED('Table (2)'),
					'Table (2)'[time]
				),
				"nn:ss"
			)
		)
	)

The result is as follow:

vzhengdxumsft_2-1706777419543.png

Best Regards,

Zhengdong Xu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@YcnanPowerBI , Instead of that on sum measure use new Dynamic Format Strings for Measures

 

example - of format

"""" & QUOTIENT(SELECTEDMEASURE(), 86400) & "." & format( QUOTIENT(MOD(SELECTEDMEASURE(), 86400),3600),"00") &  ":" & format(QUOTIENT(MOD(MOD(SELECTEDMEASURE(), 86400),3600),60), "00")&  ":" & format(Round(MOD(MOD(MOD(SELECTEDMEASURE(), 86400),3600),60),0),"00")

 

amitchandak_0-1706672574716.png

File is attached with example

 

Power BI Dynamic Format Strings for Measures| Format without converting to text

https://youtu.be/qHALucET7N8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.