Forum Discussion

oliverblane's avatar
oliverblane
Icon for Helper III rankHelper III
3 years ago
Solved

Column Totals for Time Column Formatted as Text (hh:nn)

Hi there.

 

I am trying to build a matrix that breaks down time spent on courses in different regions. I have used a measure to display the number of seconds spent as a string in the format hh:nn:ss, which works fine.

 

However, I need to remove the seconds from this string to become hh:nn, which is causing issues with the way that the column total is calculated. The total is no longer always equal to the sum of the column rows, since the total is summing the time spent on courses and then converting to hh:nn instead of converting the time spent for each matrix row to hh:nn and then summing.

 

Whether I round down or round up the minutes, the issue will remain. For example, see below where I have rounded down the minutes, and the Total_Time (hh:nn) column values do not sum to the total (58:40 + 15:57 = 74:37): 

 

I understand why the total is 74:38, since it has summed the hh:nn:ss values for each row and then rounded the minutes down, instead of rounding down the hh:nn:ss values and then summing. Is there a way to change this behaviour for a matrix column total?

2 Replies