Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Generate same key in different tables based on 2 fields

Table1 has fields T1.FieldA, T1.FieldB, Count1

Table2 has fields T2.FieldA, T2.FieldB, Count2

I need to keep the tables separate because I don't want the counts to inflate, but how do I join the two tables on fields A and B?

I could create a link table, but I would prefer to make a compound key.  Since one of these fields is text, I was wondering if there is some function that will translate the combined FieldA+FieldB to the exact same integer in both tables.

Thank you

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Table1:

LOAD

autonumberhash128(T1.FieldA, T1.FieldB) as Key

Count1

Table2:

LOAD

autonumberhash128(T2.FieldA, T2.FieldB) as Key

Count1

View solution in original post

1 Reply
Clever_Anjos
Employee
Employee

Table1:

LOAD

autonumberhash128(T1.FieldA, T1.FieldB) as Key

Count1

Table2:

LOAD

autonumberhash128(T2.FieldA, T2.FieldB) as Key

Count1