how to create templated liquid filters from multiple tables

I'm having trouble with templated liquid filters that span across 2 tables.  I have filter A and B working as they should since they are both coming from the same table, but when I bring in a new table, there seems to be a disconnect between the two tables because when I select a field in filter A, B filters but nothing changes for filter C. 

What am I doing wrong?

 

filter: A_filter {
type: string
sql: EXISTS (
SELECT A
FROM ${Table_1.SQL_TABLE_NAME}
where 1= 1
AND {% condition B_filter %} ${123.B} {% endcondition %}
) ;;
}

filter: B_filter {
type: string
sql: EXISTS (
SELECT B
FROM ${Table_1.SQL_TABLE_NAME}
where 1= 1
AND {% condition A_filter %} ${123.A} {% endcondition %}
) ;;
}

 


filter: C_filter {
type: string
suggest_dimension: C
sql: EXISTS (
SELECT C
FROM ${Table_2.SQL_TABLE_NAME}
where 1= 1
AND {% condition A_filter %} ${123.A} {% endcondition %}
AND {% condition B_filter %} ${123.B} {% endcondition %}
) ;;

}

Solved Solved
0 1 154
1 ACCEPTED SOLUTION

While writing the sql query for Filter C try adding join of table a and c for function, or

you can add normal filters on dashboard using add filter option, Add A, B, C filter.

select "select a required filter" option in advance options > Select A for B filter and A, B for C filter within filter configuration box that opens when you select edit filter on dashboard.

View solution in original post

1 REPLY 1

While writing the sql query for Filter C try adding join of table a and c for function, or

you can add normal filters on dashboard using add filter option, Add A, B, C filter.

select "select a required filter" option in advance options > Select A for B filter and A, B for C filter within filter configuration box that opens when you select edit filter on dashboard.

Top Labels in this Space