How to create table calculation using pivoted measure data?

  • 14 April 2021
  • 1 reply

I’m relatively new to Looker, so this may be an incredibly simple ask, but how do you build your table calculation to select specific pivoted columns? I can see how to select the measure I’m hoping to create a calculation for, but since it is pivoted and there are multiple versions of the same measure, how do you specify one pivoted column versus another for the same measure?




To be more specific, I am trying to just get a percentage by a calculation like this: (Transaction Count - Yes) / (Transaction Count  - Total). I just don’t know how to specify anything more granular than just the Transaction Count measure. Please help!

1 reply

It is pretty straight forward using a table calculation:

pivot_index(${<transaction count>},2)
/ ${<transaction count>:row_total}