Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team,
Please help me on below scenario.
we have raw data like below:
ID | NAME | D | STATUS |
1216 | GIREESH | D1 | PASS |
1216 | GIREESH | D2 | |
1216 | GIREESH | D3 | |
1216 | GIREESH | D4 | |
1217 | NARESH | FAIL | |
1217 | NARESH | D5 | |
1217 | NARESH | D6 | |
1217 | NARESH | D7 |
Result: Need STATUS as New Status column if ID and NAME is same.
ID | NAME | D | STATUS | New Status |
1216 | GIREESH | D1 | PASS | PASS |
1216 | GIREESH | D2 | PASS | |
1216 | GIREESH | D3 | PASS | |
1216 | GIREESH | D4 | PASS | |
1217 | NARESH | FAIL | FAIL | |
1217 | NARESH | D5 | FAIL | |
1217 | NARESH | D6 | FAIL | |
1217 | NARESH | D7 | FAIL |
Use this pattern:
DATA:
LOAD ID, NAME, D, STATUS as TSTATUS
FROM ....;
JOIN(DATA)
LOAD ID, NAME, TSTATUS as STATUS
WHERE Len(TSTATUS) > 0;
DROP Field TSTATUS;
This assumes that there is never more than one instance of ID and NAME with a status. If that is not a safe assumption, then use this for the join instead:
JOIN(DATA)
LOAD ID, NAME, MaxString(TSTATUS) as STATUS
WHERE Len(TSTATUS) > 0
GROUP BY ID, NAME;
Answer here - https://community.qlik.com/t5/QlikView-App-Development/Need-Help/m-p/1658776/highlight/false#M448554
Use this pattern:
DATA:
LOAD ID, NAME, D, STATUS as TSTATUS
FROM ....;
JOIN(DATA)
LOAD ID, NAME, TSTATUS as STATUS
WHERE Len(TSTATUS) > 0;
DROP Field TSTATUS;
This assumes that there is never more than one instance of ID and NAME with a status. If that is not a safe assumption, then use this for the join instead:
JOIN(DATA)
LOAD ID, NAME, MaxString(TSTATUS) as STATUS
WHERE Len(TSTATUS) > 0
GROUP BY ID, NAME;