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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
joef
Helper I
Helper I

Total column on Matrix BI report not summarizing full row

Hi All,

I am very new to Fabric Power BI (not as freindly as SSRS)

I am trying to create a simple matrix report from a Semantic model which was created from a Lakehouse view.

In the view I have agents in my row

I have dates on my column which I populate with hours spent in the values.  Hour spent is formatted as 2:30 for 2.5 hours its a time field.

how do I get the matrix to sumarize my row of time?  I created measures which seemd to be fine in the model, but failes to display in the matrix...

Agent2/3/252/4/252/5/25this s/b total hours how do I create? 
jondoe01:0006:0009:3016:30 
samdoe02:3008:0009:3020:00 

 

TIA,

Joe

1 ACCEPTED SOLUTION
v-achippa
Community Support
Community Support

Hi @joef,

 

Thank you for reaching out to Microsoft Fabric Community.

 

It looks like the Matrix Total column is not summing up time values as expected. Since power bi treats time fields as datetime rather than numerical values, it does not aggregate them correctly in the matrix.
Since the Hour spent column is stored in time format (HH:MM), power bi needs a measure to sum it properly.


Create a measure that converts time into minutes, sums it, and then converts it back to HH:MM format. Below is the measure:

 

TotalHours =
VAR TotalMinutes = SUMX(
'AgentHours',
HOUR('AgentHours'[Hours Spent]) * 60 + MINUTE('AgentHours'[Hours Spent])
)
RETURN
FORMAT( INT(TotalMinutes / 60), "00" ) & ":" & FORMAT( MOD(TotalMinutes, 60), "00" )


Add this Measure to the Values field in the Matrix visual. The Total Column will now correctly show summed up time in HH:MM format.

vachippa_0-1738927878588.png

Note: By default Date feild will be categorised as Date Hierarchy, change it to Date.

vachippa_1-1738928216552.png

 

Please find the below attached PBIX file for your reference.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

View solution in original post

3 REPLIES 3
v-achippa
Community Support
Community Support

Hi @joef,

 

Thank you for reaching out to Microsoft Fabric Community.

 

It looks like the Matrix Total column is not summing up time values as expected. Since power bi treats time fields as datetime rather than numerical values, it does not aggregate them correctly in the matrix.
Since the Hour spent column is stored in time format (HH:MM), power bi needs a measure to sum it properly.


Create a measure that converts time into minutes, sums it, and then converts it back to HH:MM format. Below is the measure:

 

TotalHours =
VAR TotalMinutes = SUMX(
'AgentHours',
HOUR('AgentHours'[Hours Spent]) * 60 + MINUTE('AgentHours'[Hours Spent])
)
RETURN
FORMAT( INT(TotalMinutes / 60), "00" ) & ":" & FORMAT( MOD(TotalMinutes, 60), "00" )


Add this Measure to the Values field in the Matrix visual. The Total Column will now correctly show summed up time in HH:MM format.

vachippa_0-1738927878588.png

Note: By default Date feild will be categorised as Date Hierarchy, change it to Date.

vachippa_1-1738928216552.png

 

Please find the below attached PBIX file for your reference.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

Thank you so much!!  I couldn't find that formula

GilbertQ
Super User
Super User

Hi @joef 

 

What I would recommend doing is converting your time into minutes and then using a measure to display the values where gets converted back to hours and minutes. The reason for using the measure is you can then get the totals. Here is an example

 

Convert from Seconds to Minutes with a DAX Measure - FourMoo | Microsoft Fabric | Power BI

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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