The content of this article has been moved into Looker’s technical documentation here.
This is great! I’ve wanted this feature a few times over the last little while. Love it
Can you access the ‘total of totals’, i.e. the bottom right cell when you have both ‘totals’ and ‘row totals’ checked?
This is not currently possible, however, I can pass this along to our product team.
Still, you can do a sum of the totals.
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?
Currently, you can only reference pivot values in table calculations, but I’ll make sure our product team is aware of that suggestion!
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.