Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Need to create output column in script please check below
ID | Catogery | Output |
111 | Red | 1 |
111 | 1 | |
222 | 2 | |
222 | Green | 2 |
222 | 2 | |
222 | Red | 2 |
111 | RED | 1 |
111 | 1 | |
333 | 1 | |
333 | 1 | |
333 | Red | 1 |
333 | 1 | |
333 | 1 | |
444 | 0 |
DATA:
LOAD
ID,
UPPER(Catogery) as Catogery
FROM [lib://QlikTest/Book1.xlsx]
(ooxml, embedded labels, table is Sheet1);
LEFt Join
Load
ID,
COUNT(DISTINCT Catogery) as output
Resident DATA
GROUP by ID;
HI,
Can you please provide what is the logic behind the output Column.
How do you decide is it is 0, 1 or 2?
Mark
DATA:
LOAD
ID,
UPPER(Catogery) as Catogery
FROM [lib://QlikTest/Book1.xlsx]
(ooxml, embedded labels, table is Sheet1);
LEFt Join
Load
ID,
COUNT(DISTINCT Catogery) as output
Resident DATA
GROUP by ID;