Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
HarshChachara
Contributor
Contributor

Conditional Vlookup in load on Qliksense

Hi Community!

I have the following two tables

Main Table

Key - UniquePrimary Date
AAA01/24/2019
BBB04/19/2019

 

Second Table

Key - Non UniqueSecondary Date
AAA12/23/2018
AAA01/20/2019
BBB01/30/2019
AAA03/20/2019
BBB05/20/2019

 

In my load script I am trying to add another column onto Main Table that is informed by the Secondary Table in the following way :-

Displays '1' if the Key in the Secondary Table has a date within a certain range (e.g. in the same month) of the primary date of the Key in the Primary Table. Displays '0' otherwise.

In the above example, AAA would have a '1' as Secondary Date 01/20/2019 falls one week around Primary Date 01/24/2019. BBB would have  a '0'.

How would this be possible?

 

Labels (5)
13 Replies
sunny_talwar

When I say way around, you can use Aggr()... in your example Sum(Aggr(Value, Key))

lorenzoconforti
Specialist II
Specialist II

I don't particularly like synthetic keys as they make the table look messy but in this case I would leave them to avoid any potential issue of data integrity

sunny_talwar

Agreed

HarshChachara
Contributor
Contributor
Author

Thank you gentlemen