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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
v-zhengdxu-msft
Community Support
Community Support

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.