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

Add a field composed from distinct loaded tables in Qlik Sense

Hi Guys !

Thank you in advance for your interest and help.
I need to compute a column using many loaded tables. For example :

TableX with fields : KEY, fieldX1, fieldX2, ...

TableY with fields : KEY, fieldY1, fieldY2, ...

TableZ with fields : KEY, fieldZ1, fieldZ2, ...

Tables X, Y and Z are loaded from sources.

I would like to have a TableW like this :

KEY;

function(fieldX1, fieldY2, fieldZ1) AS fieldW1

In other terms it is like to add a master dimension to a table as a new column.

Thx !

1 Solution

Accepted Solutions
Kushal_Chawda

If all the tables are link with each other, you can simply use the function in any chart expression directly. But if you want to create it in script then you first either need to join all three tables or append the table if grain  and structure of the tables are similar which will look something like below

TableX:
LOAD KEY,fielx1 as field1,fieldx2 as field2
FROM TableX;

concatenate(TableX)
LOAD KEY,fiely1 as field1,fieldy2 as field2
FROM TableY;

concatenate(TableX)
LOAD KEY,fielz1 as field1,fieldz2 as field2
FROM Tablez;

 

Now you can simply use function as function(field1)

 

View solution in original post

1 Reply
Kushal_Chawda

If all the tables are link with each other, you can simply use the function in any chart expression directly. But if you want to create it in script then you first either need to join all three tables or append the table if grain  and structure of the tables are similar which will look something like below

TableX:
LOAD KEY,fielx1 as field1,fieldx2 as field2
FROM TableX;

concatenate(TableX)
LOAD KEY,fiely1 as field1,fieldy2 as field2
FROM TableY;

concatenate(TableX)
LOAD KEY,fielz1 as field1,fieldz2 as field2
FROM Tablez;

 

Now you can simply use function as function(field1)