Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the column 'Category' and I would want to load a different column with the fields from 'Category' having a different name. Something like in the table below:
Thank you!
Category |
Group |
A |
A as X |
B |
B as X |
C |
C as Y |
D |
D as Y |
E |
E as Z |
F |
F as Z |
Maybe this: Inline mapping,
MapChange:
Mapping
load * Inline [
From, To
A,X
B,X
C,Y
D,Y
E,Z
F,Z
];
to your to/from In your table with the Appalymap() function, mapping your category values.
load
ApplyMap('MapChange',Category,Category) as Group
....
From[...];
*In this example, whatever is not found in the mapping returns the Category value, you can adjust if you do not want this return*
- Regards, Matheus