Dear EDNA Experts,
I am trying to calculate Lag forecast numbers for each month by using DAX. Can anyone please help to sort this out?
Future Month Forecast | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Forecast Submission Month | Product | 01-01-2021 | 01-02-2021 | 01-03-2021 | 01-04-2021 | 01-05-2021 | 01-06-2021 | 01-07-2021 | 01-08-2021 | 01-09-2021 | 01-10-2021 |
01-01-2021 | A | 133 | 120 | 128 | 94 | 127 | 126 | 94 | 80 | 141 | 94 |
01-02-2021 | A | 145 | 124 | 108 | 108 | 123 | 95 | 125 | 103 | 101 | |
01-03-2021 | A | 103 | 150 | 144 | 90 | 127 | 135 | 137 | 103 | ||
01-04-2021 | A | 88 | 81 | 97 | 141 | 119 | 94 | 118 | |||
01-05-2021 | A | 118 | 105 | 129 | 140 | 88 | 126 | ||||
01-06-2021 | A | 149 | 127 | 87 | 114 | 100 | |||||
01-07-2021 | A | 112 | 124 | 100 | 125 |
My required answer like below,
Actual Month | Product | Lag 3 Forecast | Lag 2 Forecast | Lag 1 Forecast | Lag 0 Forecast |
---|---|---|---|---|---|
01-01-2021 | A | - | - | - | 133 |
01-02-2021 | A | - | - | 120 | 145 |
01-03-2021 | A | - | 128 | 124 | 103 |
01-04-2021 | A | 94 | 108 | 150 | 88 |
01-05-2021 | A | 108 | 144 | 81 | 118 |
01-06-2021 | A | 90 | 97 | 105 | 149 |
01-07-2021 | A | 141 | 129 | 127 | 112 |
Example, For Apr’21, Lag 3 forecast for Product A is what was submitted during 3 months back ie, Jan’21 forecast submission for Apr’21.
Regards
Jamie