Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikuser09
Creator II
Creator II

Associate the table using new key

joining the tables using newly assigned keys
 

I have two sample tables like below

Table 1:

company codeFieldsKey1
AAManagement total1
AAstaff total2
ABManagement total1
ABstaff total

2

 

 

Table 2:

Company codeAttributed fieldskey 2
AAManager1
AACIO1
AAIT Staff2
AADev Staff2
ABManager1
ABCIO1
ABIT Staff2
ABDev Staff2

 

these tables are already joined by the primary Key company code, now I want to associate them based on Key 1 and Key 2

1 Solution

Accepted Solutions
abhijitnalekar
Specialist II
Specialist II

Can you send the screenshot of the script. The same QVF is working properly.

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

5 Replies
abhijitnalekar
Specialist II
Specialist II

HI @Qlikuser09 ,

Table1 

Load

Company code & Key1 as Key, 

Fields,

Key1

from xyz.qvd;

 

Table2;

Load

Company code & Key2 as Key, 

Fields,

Key1

from xyz.qvd;

 

Hope this help

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
abhijitnalekar
Specialist II
Specialist II

Hi @Qlikuser09 ,

 

I have attached QVF file for reference.

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
Qlikuser09
Creator II
Creator II
Author

thanks for that however for me I'm getting this error when trying to do that.

The following error occurred:
Field 'Key' not found
abhijitnalekar
Specialist II
Specialist II

Can you send the screenshot of the script. The same QVF is working properly.

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
Qlikuser09
Creator II
Creator II
Author

BaseTable

Company CodeAttributed fieldsCount
AAManager2
AACIO1
AAIT Staff1
AADev Staff1
AAManagement Total3
AAStaff Total2
ABManager5
ABCIO2
ABIT Staff3
ABDev Staff2
ABManagement Total7
ABStaff Total5

 

I subdivided this main table into two table(MAinGroup and Subgroup) using load function 

MainGroup:

Load
[CompanyCode] as [CompanyCode],

Atributedfields as Fields,

if(Fields = 'Management Total', 1,

if(Fields = 'Staff Total',2,3) as Key

Resident [BaseTable]

MainGroup:

company codeFieldsKey
AAManagement total1
AAstaff total2
ABManagement total1
ABstaff total2

 

SubGroup

Load
[CompanyCode] as [CompanyCode],

Atributedfields as AttributedFields,

if(Attributed fields = 'Manager' or Fields = 'CIO', 1,

if(Attributed fields = 'IT Staff to Attributed fields ='Dev Staff' ,2,3) as FieldID

Resident [BaseTable]

Company codeAttributed fieldsField ID
AAManager1
AACIO1
AAIT Staff2
AADev Staff2
ABManager1
ABCIO1
ABIT Staff2
ABDev Staff2

 

Now I want to join these two tables using the fieldID and Key, however these are already joined by company code