I’m using liquid to dynamically switch the metric being used in a measure based on a parameter that users select on their dashboard. I’m currently substituting in data into the SQL twice to switch the field being populated as well as the aggregation (sum vs count distinct).
Unfortunately I am confused why looker is seemingly populating strings into the SQL statement inconsistently with one string field being wrapped in parentheses and the other not. For my SQL to work properly I need these strings to not be wrapped in parentheses.
In the screenshots below I am trying to understand why the filtered_measure_aggregation (in the red box) is being wrapped in parentheses while the filtered_measure_field (in the green box) is not.
Can anyone point me in the correct direction to keep the filtered_measure_aggregation portion from being wrapped in parentheses?
My backend is BigQuery Standard SQL if that matters in this instance.
Thank you in advance for any assistance provided!