Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a scenario as below -
City | Closest1 | Qty |
A | B | 10.5 |
B | A | 20.3 |
I want to add a new column named Closest1_Qty which tells me about the Quantity for the Closest1 City as follows -
City | Closest1 | Qty | Closest1_Qty |
A | B | 10 | 20.3 |
B | A | 20 | 10.5 |
please help me in creating that new column.
Hi
Try in script,
ClosestCity:
Mapping
LOAD * INLINE [
Closest1, Qty
B, 10.5
A, 20.3
];
LOAD *, ApplyMap('ClosestCity', City) as ClosestQty INLINE [
City, Closest1, Qty
A, B, 10.5
B, A, 20.3
];