I have created a dashboard in tableau where I have 2 data sources with the same fields. I want to change the data sources using user input from a dropdown list. How can I change the data sources without creating new dashboards. Just like how I can manually replace the data source while developing dashboards in tableau.
I have these 2 data sources and the have the same fields.
I want to take the input to switch between the data sources from this parameter.
I have tried to search for a solution everywhere but couldn't find anything that worked for me.
One alternative to try rather than using two different data sources -- UNION the two tables and create a simple boolean calculated field to filter to only the rows that came from the appropriate original table based on the parameter setting. Say called, [Source_Matches?] defined as [Table Name] = [My Table Name Parameter]
Then you can put [Source_Matches?] on the filter shelf, only include rows where [Source_Matches?] is True, and then use the parameter to switch between showing, say Test and Real data or whatever your variations are.
Note string parameters can have a list of acceptable values, each of which has a "Display as" alias. So if your table names are complex, you can still allow your users to see and choose between more meaningful short descriptors.
This should work even if your tables come from different connections thanks to Tableau's federated queries. Of course if you have many separate data tables in each source, you'll have to make multiple unions -- although you might be able to share some of the same dimension and lookup tables.