Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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
Employee
Employee

Re: Generate same key in different tables based on 2 fields

Table1:

LOAD

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

Count1

Table2:

LOAD

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

Count1

1 Reply
Employee
Employee

Re: Generate same key in different tables based on 2 fields

Table1:

LOAD

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

Count1

Table2:

LOAD

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

Count1

Community Browser