
Jiří Hanzlíček
Active Member
Members

Forum Posts: 3
Member Since:
February 14, 2020
February 14, 2020

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

Mynda Treacy
Admin

Forum Posts: 4614
Member Since:
July 16, 2010
July 16, 2010

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
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online:
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
jaryszek: 183
Newest Members:
Trevor Pindling
Stevan Kanjo
Erin Sheldon
Nikita Bhatia
Sheilah Taylor
Clare Webber
David Jenssen
Dominic Brosnahan
Young You
Jennifer Owens
Forum Stats:
Groups: 3
Forums: 24
Topics: 6524
Posts: 28554
Member Stats:
Guest Posters: 49
Members: 32808
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —
