Row totals issue

  • 29 May 2019
  • 2 replies

Hi, there,

I’m facing the following issue:

I have a couple of stores and a depot. I want to calculate how much rent I pay per package for the stores and for depot. Additionally, I want to see how much total rent I pay per package that went throught the depot. It’s supposed to be something like:


When I try to accomplish this in Looker, I setted rent/min(items_sold)and was expecting Looker to just sum both outputed values, but it’s displayed the global average. Can someone, please, explain?

Thanks in advance.

2 replies

Thanks, Izzy !

Userlevel 7
Badge +1

I think you’re referring to column totals here, not row totals— Basically, what’s in D6 in your excel screenshot?

The column totals in Looker operate only over the totals row, and perform the same calculation as they would in any row over just that row— So in this case, D6 would be doing B6/MIN(C6), not D4+D5, which can be super confusing if you don’t know that it’s behaving that way.

If you need to get the sum of both outputted values, you could do it with another table calculation that explicitly sums (${rent/items}!