Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rahulgoyal1287
Contributor III
Contributor III

Qlik Sense: Help required on Scripting

Hi There,

Thanks for taking out some for my queries.

I am trying to build a solution in QlikSense  where in we have developed several QVDs which are based on multiple sheets of an Excel.

There are few columns which are common across various sheets so i have applied a Qualify * clause (which prefixed the respectibvbe table names before each attribute)...

We need to develop a dataset based on multiple above QVDs(per table) using inner joins & have to apply conditions at each QVD..

For example, there Table A & B has field X in common however it is stored with the different names as A.X & B.X respectively.

Script written:

Table_1:

Load *

from QVD-A;

inner join (Table_1)

Load *

From QVD-B;

Question 1: Is there any way to use ON Clause feature in Qlik the way we use it SQL Sever through which we can link the columns with different names?

Question 2: How can we restrict the data in above format if we have got few conditions to be applied on both QVDs(dataset)?

For example, Field Y from QVD A is need to set to 'Yes' & Field Z from QVD B should be equal to 'M'.

Thanks for the response.

Rahul Goyal

1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

you can do as below:

es.

Table_A_B:

Load A.X as X

from QVD-A where Y = 'Yes';

inner join

Load B.X as X

From QVD-B Where Z = 'M';

i hope this helps.

View solution in original post

2 Replies
undergrinder
Specialist II
Specialist II

Hi Rahul,

1. Qlik joins on common column name (natural join), you can't specify other condition, you should give the same name to join fields (you can set that in load script with alias - column1 as A).

2. you can use several expression in your load script, e.g.: if(column='Y','YES','NO'), you'll find all of them in official Qlik help website https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/functions-in-scripts-cha...

G.

agigliotti
Partner - Champion
Partner - Champion

you can do as below:

es.

Table_A_B:

Load A.X as X

from QVD-A where Y = 'Yes';

inner join

Load B.X as X

From QVD-B Where Z = 'M';

i hope this helps.