Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
Iam new to this forum and also to Qlickview.
Based on If and Match Condition, Iam trying to create values under new field Counterparty
Following is the code. It displays only 'FIN-INSTs-F1', OTHER-FIN-INSTs-F3','PSEs-S8','SOVEREIGNs-S7' under Counterparty.
Why isnt showing 'SNEs-S6', 'MDB-S3','GSEs-F5' ?
Please help me
If (match(LEGETYNACE7_BK,'6511001','6511002','7511001','7511006'), 'SOVEREIGNs-S7',
If(match(LEGETYNACE7_BK,'7511002','7511003','7511004','7511005','9112200'),'PSEs-S8',
If(match(LEGETYNACE7_BK,'6512101','6512102','6512103','6512104','9900301'),'FIN-INSTs-F1',
If(match(LEGETYNACE7_BK,'6512100','6512600','6512601','6512602','6512700','720302','6720303','7484702'),'OTHER-FIN-INSTs-F3',
If(match(CPT_LEID,'87431','322987','18820','60625698'),'SNEs-S6',
If(match(CPT_LEID,'18834','35534','18816','18849','82882'),'MDB-S3',
If(match(CPT_LEID,'11187','87667','10796','10879','10802','10867','603950'),'GSEs-F5'))))))) as Counterparty
Regards,
Paul
Maybe the matching on the field LEGETYNACE7_BK covered already the following macthing on CPT_LEID which is therefore without a result. Maybe you need to change the order in your if-loop or you needs a more complex matching. Further you should consider if mapping isn't an alternatively to your if-Loops: Mapping … and not the geographical kind.
- Marcus
Probably because all records were already matched in the earlier if branches for the LEGETYNACE7_BK field.
Hi,
one solution could be also:
map1:
Mapping LOAD * INLINE [
in, out
6511001, SOVEREIGNs-S7
6511002, SOVEREIGNs-S7
7511001, SOVEREIGNs-S7
7511006, SOVEREIGNs-S7
7511002, PSEs-S8
7511003, PSEs-S8
7511004, PSEs-S8
7511005, PSEs-S8
9112200, PSEs-S8
6512101, FIN-INSTs-F1
6512102, FIN-INSTs-F1
6512103, FIN-INSTs-F1
6512104, FIN-INSTs-F1
9900301, FIN-INSTs-F1
6512100, OTHER-FIN-INSTs-F3
6512600, OTHER-FIN-INSTs-F3
6512601, OTHER-FIN-INSTs-F3
6512602, OTHER-FIN-INSTs-F3
6512700, OTHER-FIN-INSTs-F3
720302, OTHER-FIN-INSTs-F3
6720303, OTHER-FIN-INSTs-F3
7484702, OTHER-FIN-INSTs-F3
];
map2:
Mapping LOAD * INLINE [
in, out
87431, SNEs-S6
322987, SNEs-S6
18820, SNEs-S6
60625698, SNEs-S6
18834, MDB-S3
35534, MDB-S3
18816, MDB-S3
18849, MDB-S3
82882, MDB-S3
11187, GSEs-F5
87667, GSEs-F5
10796, GSEs-F5
10879, GSEs-F5
10802, GSEs-F5
10867, GSEs-F5
603950, GSEs-F5
];
table1:
LOAD *,
ApplyMap('map1',LEGETYNACE7_BK,ApplyMap('map2',CPT_LEID,'')) as Counterparty
INLINE [
LEGETYNACE7_BK, CPT_LEID
6512101, 18816
6512102, 18817
6512103, 18818
6512104, 18819
6512105, 18820
6512106, 18821
6512107, 18822
6512108, 18831
6512109, 18832
6512110, 18833
6512111, 18834
];
provided there are other values in your LEGETYNACE7_BK field than defined in mapping table map1.
hope this helps
regards
Marco
Thank you All . I was out of the town. Thank you so much for all the help.
Regards,
Paul