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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
Super User
Super User

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
Super User
Super User

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
Super User
Super User

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.