Hello,
I have the next situation.
I need to calculate a revenue for the December which are an average for the last three months.
The exact situation.
KP | Date | Amounts |
Revenue | 2019-09-01 | 11112 |
Revenue | 2019-10-01 | 1125 |
Revenue | 2019-11-01 | 2563 |
The revenue for December will be AVG(amounts).
Then I want to save this value in DB and I will have the next value in a table.
KP | Date | Amounts |
Revenue | 2019-09-01 | 11112 |
Revenue | 2019-10-01 | 1125 |
Revenue | 2019-11-01 | 2563 |
Revenue | 2019-12-01 | 4933 |
Then the revenue for January will be avg for the last three months and the avg will be save in db.
How to do this in for one year?
Solved! Go to Solution.
Hi @Ecaterina ,
do you want the process to be executed once a month over the last three months?
I want to run for one year. The value for the next month is the avg for the previous three months.
I know the value for September, October and November then I can calculate the value for December.
For January will be average for October , November and the value which I calculate for December.
Hey @Ecaterina,
I attached a workflow which may help you achieve the result you want.
It generates a new row (or multiple rows ups to the current month) every time you run the workflow, and calculates the running average based on the Amounts value for the 3 months prior.
Hope this helps,
Mo
Thanks for the work flow, it is work fain, but I also need to add the iteration part. After is calculate the value for December I need to calculate for January until next year December.
Hi @Ecaterina ,
I've extended the workflow created by @meljaafari a bit to include the iteration. You can create additional periods by modifying the condition expression within the Generate Rows tool, I used "< DATETIMEADD([Max_date], 12, 'month') to generate 12 periods. Average is calculated by using the Multi-Row formula tool.
I've attached a sample worklflow, hope this is helpful.
Best,
Roland