Forum Discussion
JMSNYC
5 years agoHelper III
Cumulative Sum in Power Query
Good evening. I am having this problem, when I need to add any incremental sales adjustment for a given month, within a 3 month period. I tried the group function, but it does not...
AllisonKennedy
5 years agoCommunity Champion
JMSNYC Is the historical data in the same table as the new form input? If they are in different tables, seems like you first want to do a cumulative sum, then append and group the two tables.
To do the cumulative sum, you will need a column that determines order, such as an index column. You will also need to add a condition that checks if the country is the same.
Here is a post to get you started on the cumulative sum side of things: https://exceloffthegrid.com/power-query-running-total/
If you need help with the different countries side of things, please provide some sample data with the right granularity (ie is there more than one entry per month in the same country in historical data? How to handle this?)