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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. 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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.