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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
vgangabharani
Frequent Visitor

grant total of time in matrix

I have a table like below:

DatenameHours spent
1/1/2010a8:00
2/3/2010a1:00
3/8/2010b10:00
4/10/2010c19:00
1/1/2010a1:00
6/15/2010d20:00

 

When I load and use a table with name and hours spent I get the below with a having cumulative value of 10:00

nameHours spent
a10:00
b10:00
c19:00
d20:00

 

When I use matrix the sum is wrong. I am using a measure= sum(hours spent) in the matrix. 

nameDateHours spent
a 8:00
a1/1/20108:00
a2/3/20101:00
a1/1/20101:00

 

the grand total is just the first row value. Can someone help me understand this?

2 ACCEPTED SOLUTIONS
v-frfei-msft
Community Support
Community Support

Hi @vgangabharani ,

 

To create a measure as below.

hour = SUMX('Table',HOUR('Table'[Hours spent]))

Capture.PNG

 

Pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

Thanks for this. I aggregated time like this: 

Measuredummy = If(SUMX(timelog,Minute(timelog[Hours]))>=60,
concatenate(
concatenate(
//hour
SUMX(timelog,HOUR(timelog[Hours]))+quotient(SUMX(timelog,Minute(timelog[Hours])),60), ":"),
//minute
format(mod(SUMX(timelog,Minute(timelog[Hours])),60),"00")),
//else
concatenate(
concatenate(
SUMX(timelog,HOUR(timelog[Hours])),":"),format(SUMX(timelog,Minute(timelog[Hours])),"00")))

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @vgangabharani ,

 

To create a measure as below.

hour = SUMX('Table',HOUR('Table'[Hours spent]))

Capture.PNG

 

Pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Thanks for this. I aggregated time like this: 

Measuredummy = If(SUMX(timelog,Minute(timelog[Hours]))>=60,
concatenate(
concatenate(
//hour
SUMX(timelog,HOUR(timelog[Hours]))+quotient(SUMX(timelog,Minute(timelog[Hours])),60), ":"),
//minute
format(mod(SUMX(timelog,Minute(timelog[Hours])),60),"00")),
//else
concatenate(
concatenate(
SUMX(timelog,HOUR(timelog[Hours])),":"),format(SUMX(timelog,Minute(timelog[Hours])),"00")))
Greg_Deckler
Community Champion
Community Champion

I cannot recreate this. See Page 7, Table10 of attached.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.