Hi All
I'm hoping some one might have an idea how to help, I'll work through my example below.
I need to add a large number of repeated calculation columns onto my data set based on existing columns and I want to make this is dynamic and re-usable.
The existing columns are split into three groups where the column header is prefixed with the grouping. I want to be able to pass to a macro the column calculation required and new kpi name in a list. Its mostly divisions so I'll go with that for this example, but I could take it a step further and provide calculation type.
List data into macro would be as follows then also providing the data.
New Calc Column Name | numerator Column | denominator Column
e.g.
total_atv | "total_sales_net" | "total_volume"
group1_atv | "group1_sales_net" | "group1_volume"
group2_atv | "group2_sales_net" | "group2_volume"
The column headers are the same for each group apart from the text preceding the _ so I think I could go a step further and just pass the below to the macro, and the new column is prefixed with the group with the macro repeating 3 times for each grouping. Run 1 Prefix "total", run 2 prefix "group 1" ect..
atv | "sales_net" | "volume"
Any pointers would be appreciated,