Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a table as shown below:
A | B |
---|---|
A1 | 1 |
A2 | 2 |
A2 | 1 |
A3 | 2 |
Now wherever I have both values as 1 and 2 in column B for a particular value of column A, then it should be stored as 3.
The below table should be created in script.
A | B |
---|---|
A1 | 1 |
A2 | 3 |
A3 | 2 |
Can someone please help me in implementing the above scenario?
LOAD
A,
sum(B) as B
FROM ...sourcetable...
GROUP BY A;
Hi,
try something like below
t1:
LOAD * INLINE [
A,B
A1,1
A2,1
A2,2
A3,2
];
load A,if(A='A2' and match(B,'1','2'),'3',B) as new_B
Resident t1;
Regards
PFA
Table:
LOAD A,
B
FROM
[https://community.qlik.com/thread/161172]
(html, codepage is 1252, embedded labels, table is @1);
Table1:
NoConcatenate
LOAD A,
Sum(B) as B
Resident Table
Group By A;
DROP Table Table;
Best,
Sunny
PFA