Rename a Column with parameter

I need to rename a column with the currently defined reporting month, but I can't think of a way to do it.

So I have the following columns:

|Revenue Type|Revenue (USD)|Dec 2023|Nov 2023|
|advertising | 123456 | 123456 | 123456|
|Total | 123456 | 123456 | 123456|

And I need to rename the second column to the parameter {MonthColumn} (which is the reporting month in the format Jan 2024) - is there a way to do this?

i.e. it would become this:

|Revenue Type|Jan 2024|Dec 2023|Nov 2023|
|advertising | 123456 | 123456 | 123456|
|Total | 123456 | 123456 | 123456|

The "Rename columns by lookup" action should be of help here. Construct a lookup table and use the action.

1 Like

Gotcha!

So I pulled the parameters in to a table using 'Parameter table' where one parameter was the old column name and another was the new column name, and used the "Rename columns by lookup" action to swap out the column name.

Thank you.

1 Like