Field filter not working without selecting other optional filters

Hi I have a SQL question with 3 optional field filters in it. The dashboard works fine if i select at least one value in all of the filters. Since it is all optional, I was trying to only use the last filter to see if the dashboard shows only the data that is relevant to the value selected in the filter dropdown but it is showing all values until I choose a value in all the drop downs. How can I get this to work?

Without troubleshooting info and the query we can’t help you unfortunately

Here is the query:

select count(distinct Product_Id) as Products, SUBSTRING(STATE, 10, 2) as STATE_ABBRE, STATE
from Products
where Region = 'NA'
[[AND {{Product_type}}
AND {{Product_line}}
AND {{Product}}]]
[[and {{date_range}}]]
group by STATE

@Luiggi @flamber Any idea why it is not working for me?

you need to select 3 values there, it's all under the same structure

It is all optional filters. So why should I select a value in all the filters. Sometimes people may want to only select the 3rd filter which is "product", but it does not work if they don't select at least one value each in the other 2 filters.

If you check your query, you have the 3 "AND" under the same [[ ]]:

[[AND {{Product_type}}
AND {{Product_line}}
AND {{Product}}]]

if you want to make them work as you would like you need to change that for

[[AND {{Product_type}}]]
[[AND {{Product_line}}]]
[[AND {{Product}}]]

It works now. Thank you so much @Luiggi .