Looker Liquid style

Hi
How do I solve the problem in Omni that a measure is dependent on the dimensions selected?

So as an example:

The customer has selected the delivery month in his analysis.
Then the correct math is: Value / number of hours remaining in the displayed month

The customer has selected quarter, then Value / number of hours remaining in the displayed quarter.

The customer has selected year, then Value / Number of hours remaining in the displayed year.

In Looker, I can use liquid in_query to dynamically rewrite the SQL accordingly.
How do I do that in Omni?

Thanks
Ben

1 Like

I am frankly a little surprised.
I wouldn’t have thought that in such a young community there wouldn’t be anyone who is familiar with the topic.
Or that at least a product manager would jump in and answer the question…
actually a shame…

Hey Ben - apologies for this slipping through the cracks. We have Slack channels with our customers that we actively support on these kind of questions, but we need to set up better alerting for us to see when questions come up here.

Omni also supports in_query. The syntax is slightly different - it would look like:

  case when {{ my_first_field.in_query }} then a/b
          when {{ my_other_field.in_query} then a/c
  end

Let us know if that’s what you were looking for