I'm having a problem that's taking me a lot of time in Tableau Desktop. I have two databases with the same data, separated only by the year the KPIs were collected. How can I use these two tables together and use the year as a filter? There's a field in both tables for the year the data was collected. For example, 'table_2024' has the 'year' field = '2024', while 'table_2025' has the 'year' field = '2025'.
Hi, @RAFAEL DE ANDRADE
You would need a row union your data.
I may recommend three approaches:
Tableau Desktop:
https://help.tableau.com/current/pro/desktop/en-us/union.htm
Tableau Prep:
https://www.thedataschool.co.uk/sam-search/unions-and-joins-in-tableau-prep
Custom SQL:
If your data comes from a database, you may work with a DBA to build a custom sql to create a SQL sentence using UNION ALL to union your tables.
If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.
Regards,
Diego Martinez
Tableau Visionary and Forums Ambassador