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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Kinethik
New Member

Display hh:mm in a matrix from numeric seconds field

Hello all,

I'm struggling with this issue where I have a numeric column with "Net worked hours" in seconds that needs to be added by date and user and then displayed as hh:mm in a matrix.
I got everything running well, except that I can't get it to display the hh:mm.
Matrix with Net hours in seconds:

Kinethik_0-1742452401609.png

 

This is what my visual looks like, can anyone please shed a light on how to go about this?

 

Kinethik_3-1742452712476.png

 

Thanks so much in advance!!

 

1 ACCEPTED SOLUTION
Deku
Community Champion
Community Champion

If you swap from a implict measures to a explict one you can use dynamic format strings

 

Measure

 

SumHours= sum( table[hours]) / 3600

 

And the format string

 

Var hours = int( selectedmeasure() )

Var mins = mod( selectedmeasure () )

Return

Hours":"mins


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

2 REPLIES 2
mdaatifraza5556
Resolver II
Resolver II

Hi @Kinethik 

Can you please try below steps

1. Create a measure of your seconds
like ---> TotalSecond = sum(seconds)

and then 

TimeFormatted =
VAR TotalSec = [totalsecond]  
VAR Hours = QUOTIENT(TotalSec, 3600)
VAR Minutes = QUOTIENT(MOD(TotalSec, 3600), 60)
RETURN FORMAT(TIME(Hours, Minutes, 0), "hh:mm")


If you got your solution then please accept it as solution.
Deku
Community Champion
Community Champion

If you swap from a implict measures to a explict one you can use dynamic format strings

 

Measure

 

SumHours= sum( table[hours]) / 3600

 

And the format string

 

Var hours = int( selectedmeasure() )

Var mins = mod( selectedmeasure () )

Return

Hours":"mins


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors