Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
chiso_chiso
Creator
Creator

Creating a link field from a cross table

Greetings Gurus,

I have a cross table whose fields I want to use in creating a link field.

The link field will be a combination of [(Table 1......).FinYear] & [PriceBrand] & [Size] as LinkKey

Below is the load script.

CROSSTABLE ([Size],[Price],2)
LOAD
[(Table 1......).FinYear],
[PriceBrand],
[1L],
[2L],
[500ml],
[250ml]
RESIDENT [_temp_af07bda5-5af6-41a1-7169-fd954c8e];

 

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

This should work:

Transformed:
Load
[(Table 1......).FinYear],
[PriceBrand],
[Size],
[Price],
[(Table 1......).FinYear] & '|' & [PriceBrand] & '|' & [Size] as LinkKey
Resident [(Table 1...)]

- Marcus

View solution in original post

4 Replies
marcus_sommer

It couldn't be done directly within the crosstable but you could do it in a following resident load.

- Marcus

chiso_chiso
Creator
Creator
Author

Thanks Marcus,

Tried that but its not appearing in the Data Model Viewer. I am missing something

Transformed:
Load
[(Table 1......).FinYear],
[PriceBrand],
[Size],
[Price]
Resident [(Table 1...)]

marcus_sommer

This should work:

Transformed:
Load
[(Table 1......).FinYear],
[PriceBrand],
[Size],
[Price],
[(Table 1......).FinYear] & '|' & [PriceBrand] & '|' & [Size] as LinkKey
Resident [(Table 1...)]

- Marcus

chiso_chiso
Creator
Creator
Author

Like magic!!

Thank you so much.