Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
fallenangel6
Creator
Creator

Keep issue : putting conditional statements while doing keep

hi all,

i have two tables base table and validation table.  base table have a counter .when i do left join between base and validation, i am getting extra duplicate records and so when i take sum(counter), the count is more . i tried using left keep and count now matches the desired count but the problem is i have done some if conditions and all like below in validation table

If(IsNull(Email_validated_manually) or Email_validated_manually='',0,Email_validated_manually) as Email_Validated_Final,// 1 or 0 values to be used as flags

If(Email_validated_manually=1,'Yes','No') as Email_Validated,// for filters in front end

and this maps incorrectly when left keep is done.

Please help.Sample data given below.

i cant put up an accurate scenario here but in my data model, by using left keep my count matches. but i need to create some field based on the validation table to filter the base table. how can that be possible?

base table:

clsidpartyrkemail correct patternemail incorrect patternPan correct patternPan incorrect pattern
111111010
111120001
111131011
111140101
222251010
222260110
222271100
333380110

 

validation table:

partyrkEmail validated manuallyEmail Manual commentpan validated manuallyPan Manual comment
41correct Email  
81correct Email pattern  
41email id correct1Correct Pan

 

the desired output isgiven below.

Please help asap.

clsidpartyrkemail correct patternemail incorrect patternPan correct patternPan incorrect patternEmail validated manuallyEmail Manual commentpan validated manuallyPan Manual commentEmail Validatedpan validated
111111010    NoNo
111120001    NoNo
111131011    NoNo
1111401011email id correct1Correct PanYesYes
222251010    NoNo
222260110    NoNo
222271100    NoNo
3333801101correct Email pattern  YesNo
5 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

How do you know which row to connect from Validation table for example when partyrk = 4?
Sue_Macaluso
Community Manager
Community Manager

Is this for QlikView or Sense? I would like to move this to the correct product forum
Sue Macaluso
fallenangel6
Creator
Creator
Author

I tried using updated date for each record( that is another field in
validation table) but there are multiple records for the same partyrk
updated on the same day.i used max(updated day) to fetch most recent record
but bcz of this duplication,im having troubles.
fallenangel6
Creator
Creator
Author

best record. i took max (email validated manually) for the id but had trouble getting the text one.
fallenangel6
Creator
Creator
Author

qlikview