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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Solution Specialist
Solution Specialist

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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