[RETIRED] How to refer to totals and row totals in table calculations (3.24+)

The content of this article has been moved into Looker’s technical documentation here.

1 Like

This is great! I’ve wanted this feature a few times over the last little while. Love it :grinning:

Can you access the ‘total of totals’, i.e. the bottom right cell when you have both ‘totals’ and ‘row totals’ checked?

Hi Ethan,

This is not currently possible, however, I can pass this along to our product team.

Still, you can do a sum of the totals.



1 Like

What if you wanted to take the average of a row instead of the total – is there a way to do that without pivot_offset? (Or is there a way to pass the number of columns to a calculated measure, which would be divided from the measure’s row_total?)

Hey Rob - the best way to do this with a pivoted table would be to add up each value in the row using pivot_index. This allows you to refer to the index of each column (more about using pivot_index here). This would then create a total value, that you can divide by the number of columns.

We don’t currently have a way to do table calcs across rows (or automatically calculate how many pivoted columns there are), but I will pass that on to our product team!

How about in LookML?

Hi @Hendrik

Currently, you can only reference pivot values in table calculations, but I’ll make sure our product team is aware of that suggestion!

1 Like

Is it possible to reference total of totals in table calculations? I have my row_total but I want to know % of total for each row?

Is this referring to the same table-calc related question as the other thread? Or is it separate— I’m not sure if I understand the distinction.