Notifications
Clear all
Power Query
2
Posts
2
Users
0
Reactions
79
Views
Topic starter
I have a silly question - I need tu sum last 12 columns from 20 to make Moving Annual Total and I need to do it in power query. But headers of that columns are changing - they contains month names. So I found something, but i cannot make it work - here is syntax I need to correct from you:
= Table.AddColumn(Source, "MAT", each List.Sum({ Table.ColumnNames(Source){1}, Table.ColumnNames(Source){2}}), type number)
Thank you very much in andvance to helping me with my problem :-). Jiri
Posted : 03/06/2021 2:12 am
Hi Jiri,
Your data is in the wrong format. You should never have the columns represent a separate month. This data needs to be unpivoted. From there you can create a PivotTable with your moving annual total.
Mynda
Posted : 03/06/2021 3:56 am