Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
stanciuc
Contributor II
Contributor II

How to create columns based on second table and append to the main table in table chart?

Hello,

I have a problem with a table chart where I want to add 2 columns that update dynamically based on 2 different input date fields. 

I have 2 data sets with different data that can be linked by an ID( not linked in the script). In a table visualization I want to display the data from first dataset and add 2 columns that select the specific data from the second dataset based on the 2 input date fields.

Dataset 1: ID, CName, CType

Dataset 2: ID, Date, Amount.

I created a table chart with Dataset 1. I want to add "Period 1" and "Period 2" columns. Both columns update based on the input date fields( vInput1 and vInput2).

I tried an IF statement If( ID = ID and Date = '$(vInput1 )', Amount). It returns the amount value but also duplicates the lines and adds a null value.

I tried set analysis but I was not successful as it  doesn't return anything.

Is there a way to achieve this behavior? 

Thanks in advance 

Labels (4)
0 Replies