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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Chas2002
Helper III
Helper III

Matrix Table Custom Total

Hi Everyone,

 

I've been working with Power BI for a few weeks now and all is going well.  However, I've ran into a perplexing issues with Matrix row/column Totals, Aggregate Types, and Printing.

 

The problem:  I'm using time as hh:mm:ss but can't find a way to aggregate it because Power BI considers it Text type.

 

I have the seconds that the hh:mm:ss were derived from, so I attempted to create a custom Total column, but can't get DAX to allow me to create the column.

 

Please see attached image.  My datasets are Whole Numbers (Peg counts and seconds) and Text (seconds to hh:mm:ss).

 

Any help would be greatly appreciated.

 

Thanks,Matrix_Issue.jpg

Chas

 

 

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

Here is an article and a quick measure that might help:

 

https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/td-p/342279

 

Hmmm, you also may need this:

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376



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...

Hi Smoupre,

 

I checked each link.  The first link will convert sec to hh:mm:ss and that's fine but I already have secs converted to hh:mm:ss.  I'll use this DAX at the BI Desktop level.

 

The second link is a good representation of the first link.

 

The third link, dealing with measures, is along the lines of what I'm in need of.  

 

I need to aggregate "hh:mm:ss" -- I fear that the only way to do this is remove the Total column that's part of the Matrix Table Field well and replace it with a custom DAX function that itterates over all my "hh:mm:ss" row data and aggregates to results.  This is what I need help with <-- creating this custom field for Totals.

 

Thanks,

Chas

I guest I'm looking for something like this in DAX?

 

DAX: Get Filter that's in place,
DAX: SUM(agent_interval[ACD Time])
DAX: Loop over all rows

 

Save that is a Custom Total column..

 

Chas

I guess what I was thinking was to create measure along the lines of the third link. If you are in a row or column, just display the value. If not, then use the second link to convert your duration format to seconds, aggregate and then use the first link to convert back to duration. Sample data would help me get more specific.



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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.