Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
louise119
Creator III
Creator III

Switch Table with same filter

I created a script like the attached image and created NewTableA and NewTableB.
Each table has a row number.

In this state, I want to switch tables with the same filter using a container.
Is there a way?

0_test.png

1_test.png

1 Reply
justISO
Specialist
Specialist

Hi,  first thing what comes in mind, in TempA (same in TempB) you are joining tables without common key, [Region, City]->[Cost, Date]. Maybe it works for you, but usually it should look like this [Region, City]->[City, Cost, Date].
Other suggestion would be not to create 2 separate tables, but only 1 (you can concatenate NewTableB to NewTableA), as Region and City dimensions are in both your tables, and in report level just make 2 different tables, one with Region, City, Cost, Date. Other with Region, City, Customer Number, Customer. Or at least not call them Region A, Region B, have synthetic key, but also possibility to filter both tables with Region and City filters.
If you want to switch tables with a help of filter you can create separate table, without any connections with other tables (island data table), f.e.:

switch:
load * inline
value,
T1
T2];

Add dimension 'value' as a filter in your report. In your Container for each tables set Show conditions: for one if(GetFieldSelections(value)='T2', 1), for other if(GetFieldSelections(value)<>'T2', 1). Or use similar approach with variable instead dimension.