Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data from Table A , B with some condition..

Hi All

I have below table with fields VID, LID and Category and Subcategory.

   Table1:

   

VIDLIDcategorySubCategory
V12L09HCL
V36L32HCD
V65 HCD
M87L8HCL
M90L5HCC
C63L8HCL
J18L9HCM
P27 HCD

Table2:

   

LIDLlocationCategory
L9555034ChinaHC
L9645384ChinaHC
L9712371IndiaHC
L9712383IndiaNA
L9712395SLNA
L9712474USAHC
L9713337AFGDA
L9713349HKJP
L9713351SA

HC

I want to create a chart which will have all fields of Table1  where SubCategory is either L or D.

 

1. Copy all rows from Table A
2. Add  LID's from Table B (Only when Category Is not HC)
2 Replies
sunny_talwar

Like this?

Capture.PNG

Not applicable
Author

Try this in Load Script;

Final1:
LOAD * where SubCategory='L'
OR SubCategory='C';
LOAD * INLINE
[VID, LID, category, SubCategory
V12, L09, HC, L
V36, L32, HC, D
V65, ,HC, D
M87, L8, HC, L
M90, L5, HC, C
C63, L8, HC, L
J18, L9, HC, M
P27, ,HC, D
]
;

Final2:
LOADwhere Category='NA' OR Category='DA' OR Category='JP' ;
LOAD * INLINE
[LID, Llocation, Category
L9555034, China, HC
L9645384, China, HC
L9712371, India, HC
L9712383, India, NA
L9712395, SL, NA
L9712474, USA, HC
L9713337, AFG, DA
L9713349,HK, JP
L9713351,SA, HC
]
;

Thanks,

Shekar!!