Solved

LookML - filter measure by the dimension in another view

  • 25 September 2021
  • 3 replies
  • 139 views

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

 

icon

Best answer by IanT 26 September 2021, 00:27

View original

This topic has been closed for comments

3 replies

Userlevel 6
Badge

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

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

Userlevel 6
Badge

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