Hello knimers,
I m working on a report in which i have to compare 2 periods against each other, and the name of these periods changes (at a time it can be month 5 and 4 and at a different time it can be month 5 and 6) which is why i renamed to p2 and to p1 to avoid keep writing and changing math formulas and rule engine every time. However, how can i revert to the old names.
I though of unpivoting then using string manipulation, but is there a better way?
Trick is to use Extract Column Header to get “standard” column names. Then you can apply your logic and bring back original column names with Insert Column Header node.
You have to be careful to always have same table structure but again there are nodes that can help you with it like Table Validator or Table Validator (Reference).
Additionally Column Expressions node can access column values based on it’s index so you could build and apply your logic in it without changing column names.