Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
GraceGao
Creator
Creator

Join Table with condition

Hi Experts,

I have material table as below screenshot Table A, there is valid from and valid to date to determine which type it is.

how could i  join table (expected result as Table B) using business date to get material type.

condition: business date >= valid from and business date <= valid to.

Please help.

Thanks.

2 Replies
GraceGao
Creator
Creator
Author

how could i realize in data loader editor?

Kushal_Chawda

 

TableA:
load Material,
[Valid From] + iterno()-1 as [Business Date]
[Material Type]
FROM TableA
While [Valid From] + iterno()-1<= [Valid To];

Map_Material_Type:
load Material&[Business Date] as Key,
[Material Type]
resident TableA;

drop table TableA;

TableB:
load [Business Date],
Material,
Sales,
applymap('Map_Material_Type',Material&[Business Date],'NA') as Type
FROM TableB;

Note: In apply map, field names (Material&[Business Date])should be from TableB