How to add Average to a table like Totals

  • 23 September 2022
  • 2 replies


I am trying to do something in Looker that seems like it should be simple. 


I know there is the check box, “Totals” that you can check which would add a row to the end of your data table the totals of each column. I want to do that exact same thing but with an Average, not a total. I have not been able to do it. My table is simple, the first column is dates, and the second column shows the units sold for that week. At the bottom of that column, I want an average to display. 


I am pretty new to Looker, so have been able to do a lot with the basic back-end capabilities, but not versed yet in the SQL / more advanced parts. 


Any ideas? 

2 replies

Userlevel 7
Badge +1

That’s not possible because we can’t “add” rows to our data table. If you selected an average per date as a measure, then Totals would actually be a global average but the Totals are always calculated from the measures and their corresponding aggregation (sum/count/average)

Userlevel 2

“I want to do that exact same thing but with an average, not a total.”

Even though it is called ‘Totals’ it covers all measures and not just sum. The only difference is that the grouping columns in the table are ignored when the measures are calculated in the Totals row (see the generated sql).