Can we use liquid parameters in string filter field to assign dimension values to be used as dynamic filters

Shubh1
Participant I

Hello,

I came across one use case where I had to assign multiple filters based on a specific value of a dimension, I was able to achieve it via using template filters using case when statement.

For example : 
 

filter: variables {

type: string

sql: case when {% condition variables %} “Men” {% endcondition %}
then ${age_group} = “25-45”  AND ${status} = “permanent”
when {% condition variables %} “Women” {% endcondition %}
then ${age_group} = “18-45”  AND ${status} = “permanent” AND ${subsidy} = “commissioned”
}



Question - can we recreate the same logic using liquid if or parameters, i tried my best but nothing is working in the substitution.

Appreciate the help !!

 

0 0 186
0 REPLIES 0
Top Labels in this Space
Top Solution Authors