LookML - filter measure by the dimension in another view

Context:

  • View 1: Fact Sales
    • Dimension:
      • Date
    • Measure:
      • Total Sales
  • View 2: Dim Calendar
    • Dimension:
      • Date
      • Year

Question:

given the above two views which in Explore are combined via join, how can I define the following Measure in the View (LookML): Total Sales filtered by ‘Dim Calendar’[Year = 2020].

This needs to be a new measure that exists within the View definition.

Thank you,

Enrico

https://docs.looker.com/reference/field-params/filters

1 Like

This is very interesting. Basically I can define a measure in the View layer that relies on the relationship defined in Explore layer?

Yes it will join in what it needs for the selected fields.

1 Like