
Below is the sample dataset i have. Except for the last 3 month sales other columns are hard coded. User will enter data in it. I want to set up a business rule or power automate flow. That sums up last 3 months sales of perticular product and put it in that colum. For eg. Product A Jan-23 sale is 5000, Dec-22 sale is 5000 and Nov-22 sale is 5000. So the value will be 15000. How would i do that? I have full control over solution design, So easiest way would be good. Thank you.
| Month-Year | Name | Current Month Sale | Last 3 Month Sale |
| Jan-23 | Product A | 5000 | 15000 |
| Jan-23 | Product B | 10000 | 30000 |
| Jan-23 | Product C | 15000 | 45000 |
| Dec-22 | Product A | 5000 | 11000 |
| Dec-22 | Product B | 10000 | 22000 |
| Dec-22 | Product C | 15000 | 33000 |
| Nov-22 | Product A | 5000 | - |
| Nov-22 | Product B | 10000 | - |
| Nov-22 | Product C | 15000 | - |
| Oct-22 | Product A | 1000 | - |
| Oct-22 | Product B | 2000 | - |
| Oct-22 | Product C | 3000 | - |
Is that a Power BI dataset? If yes then run a DAX query that implements your business logic. Ideally your dataset's data model includes a calendar table so you can use the standard time intelligence functions in DAX.