For non-Looker Developers... How to get a measure of a measure

Is there a way to get this type of measure?

[Count of Customers] with >= 2 orders

0 2 349
2 REPLIES 2

This is essentially a double aggregation. SUM(COUNTIF()) kind of thing. Even if dialects like BigQuery it’s not allowed as you would get an error “Aggregations of aggregations are not allowed”. If you want to do that, you need “number of orders” to be a dimension in your table, or a derived table where you aggregated number of orders and join it to this view. Either way this number has to be a dimension in order to filter by it

Double aggregations are not possible in Looker.  Looker does has a process called “dimensionalizing a measure” whereby you redefine a measure as a dimension. Essentially you’ll want to create a derived table that includes the measure you’d want to dimensionalize in its SQL definition 

Documentation: https://help.looker.com/hc/en-us/articles/360041919653-How-to-Dimensionalize-a-Measure-in-Looker

Top Labels in this Space