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: 
bharatkishore
Creator III
Creator III

Mapping or left Join

Hi All,

I have two tables. In table A  i have Equipment and Posting Date.

In table B i have  [Sales Document],
Item ,
Equipment,
Start_DT_New,
End_DT_New,
MaterialEntered

Now for [Sales Document],Item ,  and MaterialEntered the condition is i need to get only records based on the below condition i.e.

if both the table  equipments matches and Posting Date>=Start_DT_New and Posting <=End_DT_New.

Can you please tell me how to achieve this and let me know if you need anything more.

Thanks,

Bharat

15 Replies
pradosh_thakur
Master II
Master II

Do a mapping load and put a where condition on the resulting table may be.

Learning never stops.
bharatkishore
Creator III
Creator III
Author

I have tried that but the prob is for Ex:
i have in Table 1 i have 1 equipment number has record 1A
in Table 2 i have the same equipment number with two records 1A and 2A the output i will be getting is 1A and 2A even the duplicate reocrds.
But i need only matching records i.e. 1A no duplicate records..
pradosh_thakur
Master II
Master II

Are you saying Equipment is not the most granular data and something else is? 

You need to filter the date condition right? If you need the data that is present in table 1 you can definitely do a left join , apply map will give you the flexibility to enter default value for the non matching rows. At the end you need to see what is feasible for the data set you are using.

Learning never stops.
bharatkishore
Creator III
Creator III
Author

I need to filter based on two conditions
1) when both the equipment matches in both the tables
2) when posting date is >=Startdate and posting date is <=Enddate. Hope i am clear..
pradosh_thakur
Master II
Master II

Do a inner join and put a where condition on the resulting table . I think it will work for your case.
Learning never stops.
bharatkishore
Creator III
Creator III
Author

So mapping is a wrong choice? correct..
pradosh_thakur
Master II
Master II

if the column you are using for mapping is not the least granular then yes it's not a right choice. Again your case seems like it warrants an inner join.
Learning never stops.
bharatkishore
Creator III
Creator III
Author

OK Thanks. let me try and get back up to you..
I have tried mapping but i am getting duplicate records as well..
Vegar
MVP
MVP

It sounds to me that you could benefit from using intervalmatch() with extended syntax. Take a look at the Qlik help section. https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/IntervalMatc...