Reusable Table Calculations defined in LookML layer (new field type)

  • 20 January 2022
  • 0 replies

Userlevel 7
Badge +1

Lately I find myself wanting to use a measure of type: running_total in another measure. Things like that are great for expressing history of a metric. For example:

Paid month

Total value to be paid - Value paid running (AKA value left to pay)


Yes, we can use table calculations for that but what’s missing is the reusability of fields that are needed all the time. I imagine it would be great to be able to define a new type of field that is defined in LookML but the engine knows it can only be executed post-SQL.

This is how I envision this:


Custom fields are technically custom but also LOCAL - something that not-so-advanced users of Looker do not realise.


-- edit

Another downside of Custom Fields is that the measures being used have to be selected. With LookML definition, I hope they could be just added to SQL but not necessarily to the Data Table

This topic has been closed for comments