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

Load Script to show only the values as per selection

Hi,

I've below sample data from different data sets.

Tab1:
Load * Inline
[
ID, Code
1, AB
2, AC
];

Tab2:
Load * Inline
[
ID, QV
1, NFA
1, NFB
2, NFC
2, NFD
];

Tab3:
Load * Inline
[
QV, Sale, Code1
NFA, 100, AA
NFB, 200, AB
NFC, 300, AC
NFD, 400, AD
];

Exit Script;

After loading, in the front end I created filters for ID and Code, If I select ID as  1 then code AB is activated. Now my requirement is if I select ID as  1 then code AB has to be activated along with that QV has to display NFB and Sales has to display 200 and Code1 has to display AB only.

Regards,

Barat Vikas

@PrashantSangle 

2 Replies
BrunPierre
Master
Master

Have a go at this remodelled script syntax

MergedTable:
LOAD QV, Sale, Code1 as Code,Code1
RESIDENT Tab3;

LEFT JOIN(MergedTable)
LOAD ID, Code
RESIDENT Tab1;

LEFT JOIN(MergedTable)
LOAD ID, QV
RESIDENT Tab2;


DROP TABLE Tab3,Tab1,Tab2;

EXIT SCRIPT;

Output

peter_brown_0-1661298101410.png

 

 

 

sidhiq91
Specialist II
Specialist II

@vikasshana  Please follow the below script:

NoConcatenate
Temp:
Load QV, Sale, Code1 as Code, Code1
Inline
[
QV, Sale, Code1
NFA, 100, AA
NFB, 200, AB
NFC, 300, AC
NFD, 400, AD
];

left join (Temp)

Load * inline [
ID, Code
1, AB
2, AC
];

left join (Temp)

Load * Inline
[
ID, QV
1, NFA
1, NFB
2, NFC
2, NFD
];

exit Script;

If this resolves the issue please like and accept it as a solution.