I have a couple of visualizations using custom queries, and I need to change the query depending on user interaction if a given field exists in the database. For example: Let’s say the custom query is built using a field called pricepaid_city, and the user decides to select (a dropdown let’s say) to the state level, in that case, I need to change my custom query to use pricepaid_state and query again.
Is that something that I can do by modifying the query or do I need to create as many queries as I may need beforehand?