Forum Discussion
Rolling LTM
hi PBI experts,
i want to show a rolling LTM for the last 12 periods (so every period has to show the LTM sales). i have the following monthly facts table:
| Period | Sales |
| 2019-01 | 13 |
| 2019-02 | 15 |
| 2019-03 | 15 |
| 2019-04 | 18 |
| 2019-05 | 10 |
| 2019-06 | 8 |
| 2019-07 | 11 |
| 2019-08 | 19 |
| 2019-09 | 13 |
| 2019-10 | 12 |
| 2019-11 | 14 |
| 2019-12 | 13 |
| 2020-01 | 12 |
| 2020-02 | 15 |
| 2020-03 | 14 |
| 2020-04 | 18 |
| 2020-05 | 10 |
| 2020-06 | 12 |
| 2020-07 | 20 |
| 2020-08 | 21 |
| 2020-09 | 17 |
| 2020-10 | 19 |
| 2020-11 | 15 |
| 2020-12 | 18 |
| 2021-01 | 16 |
| 2021-02 | 13 |
| 2021-03 | 19 |
| 2021-04 | 17 |
| 2021-05 | 18 |
| 2021-06 | 15 |
I want the following output:
Period filter: select the period, fe 2021-04
output:
| Period | Value | |
| 2020-05 | 159 | Sales between 2019-06 and 2020-05 |
| 2020-06 | 163 | Sales between 2019-07 and 2020-06 |
| 2020-07 | 172 | Sales between 2019-08 and 2020-07 |
| 2020-08 | 174 | etc |
| 2020-09 | 178 | etc |
| 2020-10 | 185 | etc |
| 2020-11 | 186 | etc |
| 2020-12 | 191 | etc |
| 2021-01 | 195 | etc |
| 2021-02 | 193 | etc |
| 2021-03 | 198 | etc |
| 2021-04 | 197 | etc |
So i want to present the last twelve month from the selected period, and in those twelve month the LTM sales.
I hope someone can help me out.
Thank in advance,
Regards,
Frank
3 Replies
- Greg_DecklerCommunity Champion
frankhofmans I wrote a rolling months once: Rolling Months - Microsoft Power BI Community
- frankhofmansHelper IV
hi Greg,
thanks for the link. I still haven't got the right result. i only get the results per period, en not the total of the 12 months. Do you have another suggestion?
Regards,
Frank
- AnonymousNot applicable
Hi frankhofmans ,
Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thank you very much for your kind cooperation!
Hope it helps,
Community Support Team _ CaitlynIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.