Table calculations of totals and row totals?



+1 from me
+2 from my engineers who wish Looker had this feature
+3 from my analysts who avoid using Looker because it lacks features like this

(Desiree) #22

Thanks, @jbroberg, I’ve passed along your feedback to the Product team. And thank you for the details on who in your company is interested in this feature.

(Menashe Hamm) #23

I’ll add my +1 to the pile.

(Max Glantzman) #24

+1. Analysts here ask about this regularly.

(Alex R) #25

Adding a +1 in hopes this gets prioritized

(Greg Roberts) #26

+1 here.

Astonishing that this has been open so long. Seems like a very small thing to implement.

(Ari Sigal) #27

+1 for this feature

(gavin.wims) #28

Just an update on this, folks - the Product team is still actively considering adding table calc totals and they are well aware of the level of demand that exists for this feature. It might be worth checking back with us in a few weeks as there may be a positive update by that time.

(Ezra Wolfe) #29

+1 on this :sunglasses:

(leticia.esparza) #30

Hey @Ezra_Wolfe,

I was sure to relay the feedback to the product team. Thanks for letting us know that this is something you’d like to see!



(Marie Beaugureau) #31

As of Looker 6.2, table calculations now work with totals. See this documentation page for more information.


@marieb does the table calc have to be in a certain format/measure? I don’t see the feature working as expected (testing Looker 6.4)

(Izzy) #33

What about it don’t you see working? The thing to remember with totals is that they run the same function as the column, but only over the totals row— So a mean() table calculation will return mean(total), not the sum of the values in that column.

Something like stdev() for example, which requires multiple values, will return 0, since it’s trying to execute over just the totals row/1 value. Does that click with what you’re seeing?


I created a table calc that is an integer multiple of a column in the results and expected the sum of the individual values in that column. from your response seems this should’ve still worked since integer*(sum of values) = sum of (values*integer), however I’m seeing a NULL result.

Perhaps, when no functional operators are used there should be a default behavior?

(Izzy) #35

That use case does sound like it ought to work… I just tried 5.0*${table.count}and it’s correctly doing 5*${table.count:total} for the totals row. What’s the full formula you’re using?

The default behavior idea is not a bad thought— Like for your example, then by default it would be just a sum total (what most people think of when they think total). I’ll bring that up internally.

The question is, does it get too confusing to have different behaviors for the same feature? It’s hard to message that properly with a good UI/UX…


Ah, I see the issue. The Look I’m debugging is performing a dimension * integer (the dimension is a type: number)

I was able to work around this by:

  • didn’t work: created a table calc referencing the dimension, then another table calc referencing this. seems this produces a table calc that behaves like a dimension too for this feature.
  • worked: created a sum custom measure referencing the dimension, then created a table calc referencing this custom measure which accurately produced the sum of dimension * integer I needed

(Izzy) #37

Aaah, that makes sense. Nice job!