Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
ID | STATUS | DESCR | ID | STATUS | DESCR | ||
aa | OK | x | aa | OK | x | ||
aa | OK | x | aa | OK | x | ||
bb | OK | x | bb | FAIL | x | ||
bb | OK | Reject | bb | FAIL | Reject | ||
cc | OK | x | cc | OK | x |
IF 'Reject' is found in column DESCR then change STATUS to 'FAIL' for all rows with the same ID (in this case BB)
@QlikV1 Maybe like :
Input_QVD:
LOAD * INLINE [
ID, STATUS, DESCR
aa, OK, x
aa, OK, x
bb, OK, x
bb, OK, Reject
cc, OK, x
];
left join
load ID,MinString(DESCR) as NewStatus resident Input_QVD group by ID;
Final:
load ID,if(NewStatus='Reject','FAIL',STATUS) as STATUS,DESCR resident Input_QVD;
drop table Input_QVD;
output:
@QlikV1 Maybe like :
Input_QVD:
LOAD * INLINE [
ID, STATUS, DESCR
aa, OK, x
aa, OK, x
bb, OK, x
bb, OK, Reject
cc, OK, x
];
left join
load ID,MinString(DESCR) as NewStatus resident Input_QVD group by ID;
Final:
load ID,if(NewStatus='Reject','FAIL',STATUS) as STATUS,DESCR resident Input_QVD;
drop table Input_QVD;
output:
Thank you for your prompt feedback, works like a charm : )