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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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
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
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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

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