Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have one Field lets say A which contains 5 values p,q,r,s,t. Now i need to create one additional field which will be based on values from Field A like follows,
p + q + r = 'X' and p + r = 'Y' <- New Field
How can we create this new field for such a scenario?
Share any sample file or let me know p,q,r,s,t is number or string it is. If it is number then use group by in the load script.
Source:
LOAD * Inline
[
A,Value
p,10
q,20
r,30
s,40
t,50
];
LOAD
A,
Sum( IF(Match(A,'p','q','r'), Value) ) as X,
Sum( IF(Match(A,'p','r'), Value) ) as Y
Resident Source
Group By A;
Regards
Anand