Hi all,
I am relatively new to Looker and have been working on a few pre-existing dashboards for my organisation.
The question I have is that the suggestions in my explores do not work consistently when I apply the always where constraint. The name suggestions will pop up with all the values without using the ‘where’ clause. However, I would like to filter it based on a condition.
For example. I have a client table with ‘id’, ‘name’ and ‘type’(in this case there are 2 types: A and B).
I want the client name suggestions to be filtered by type and that is when I use the always where constraint. It works for majority of my use cases. However, for 2 explores (Sample_A and Sample_B) in particular it won’t show any suggestions. Both explores contain data for only on 1 client type. So I want the suggestions to filter accordingly.
To give you a bit more context.
The explore in question:
explore: Sample_A {
sql_always_where: ${customer.type} = 'A' ;;
join: customer {
relationship: many_to_one
sql_on: ${customer.id} = ${Sample_A.client_id} ;;
}
always_filter: {
filters: [timestamp_filter: "7 days"]
}
}
This removes the suggestions completely. If I use it without the ‘where’ constraint, I get a list of all client names.
Could someone tell me if I’m missing something?
I assume if it works for one case it should work for another as well.
Thanks in advance.
Nate