I would create two sheets: One for the first click, and one for the second click.
The second click sheet (the one filtering by state). Should have all the ID's by state.
Then use dashboard actions to filter the second sheet on 'State' when the first sheet is clicked.
I hope that helps. I can also answer additional questions if you have any.
That works if I'm not using live queries.
I don't want the 2nd sheet to execute until I click on the first sheet. And then I want the ID that they click on to be passed into a parameter that will be used in the 2nd query.
The issue is that I cannot create a full datasource of the 2nd query to let the first sheet just filter the 2nd. I need to run the 2nd sheet with a live SQL query.
When you say 'Live SQL Query' are you talking about a live connection to a SQL Database?
Tableau itself uses a SQL language called VizQL to run all of it's queries in the background to get the data that you need based on filters, selections, etc.
Yes, a SQL database query.
I have 1 SQL query that runs on a parameter that returns a list, and when I click on one of the results I want to run a completely different SQL query using the ID that I just clicked on from the first query and run a second query.
Please forgive me and I'm missing something obvious (could likely be the case)
But I still think that Dashboard actions are what you need. You can create a custom dashboard action and run a 'Second Query' based on whatever selection you make on the first sheet.
You can check 'Selected Fields' to ensure it is returning exactly what you'd like. The pick the fields: (Please excuse black bars)
Ok. You were right. Awesome!
The problem I had is that I had a parameter in my live query still and so it wasn't working. When I removed the parameter from my query then the action filter worked.