This needs way more discussion, but putting this as an issue so that I remember.
We can have a calculated/derived metric that's composed of one or more regular metrics and stitched together by an expression of those metrics. These regular metrics still have to abide by the same rules as before -- i.e., they should be an aggregation with a single result column.
In the example above, the regular metrics are views, defined as SELECT SUM(views) FROM B, and signups, defined as SELECT SUM(signups) FROM A. Then they can be composed in various ways to form a derived metric - in the example above, the composing is defined by the expression signups / views to form a ratio.
There will have to various rules on this type of derived metric to make sure that (a) they are always operating on the same level and (b) that they share dimensions and specifically share all required dimensions.
This needs way more discussion, but putting this as an issue so that I remember.
We can have a calculated/derived metric that's composed of one or more regular metrics and stitched together by an expression of those metrics. These regular metrics still have to abide by the same rules as before -- i.e., they should be an aggregation with a single result column.
In the example above, the regular metrics are
views
, defined asSELECT SUM(views) FROM B
, andsignups
, defined asSELECT SUM(signups) FROM A
. Then they can be composed in various ways to form a derived metric - in the example above, the composing is defined by the expressionsignups / views
to form a ratio.There will have to various rules on this type of derived metric to make sure that (a) they are always operating on the same level and (b) that they share dimensions and specifically share all required dimensions.