Question

Measures from separate Views

  • 21 July 2022
  • 2 replies
  • 34 views

Hi there,

Suppose I have two tables, Revenue and Expenses, where Revenue has a measure named rev, and Expenses has measure named exp.

If, in a Looker Revenue view, I want to create a Profit measure (rev - exp = profit), is there way to reference the Expenses view from the Revenue view, assuming a join path is defined in a model? Or is the only way to either do it via a derived table, database view, or as a calculation in a Look?

Thanks,
Allan


2 replies

I think I see now -- is the best solution to:

  1. Join the two Views in an Explore
  2. Create a third View, based on that Explore, as a Native Derived Table
  3. Use a derived_column to create the profit measure?

Thanks,
Allan

@actt-  The best way is join both views the explore (if both tables have the relationship) and create new measure.

Reply