ok...
1) LCode: You really need it for cumulative calculations such as for projected stock calculation without heuristic run (e.g. in control tower planning area SAP5 in KF HPROJINV which is used for SCCTPROJECTEDINVENTORY). If I post more here, my entry will likely be removed, sorry.
2) Excel: Do you know how to work with local EPM keyfigures?
There is the downside that you can only calculate with what you see in your template, so if you would like to see the average of the PAST 3 months, you would need to include those into the planing view or to have a keyfigure with display lag of e.g. one year (compare model config guide chapter "Example: Attribute Transformation" to grab previous data
If you wanted to see at one point at time for all periods the average of the last 3 months, than I suggest you provide a defined cell some place above the grid which you highlight in a different color to enter the "3" into it. Planner can change that and result will be visible immediately. Give that cell a "name" (menu-> Formulas-> name manager).
Than add a local member (tab "IBP" -> Advanced -> EOM Edit Report -> in the popup go to Local Member). Add a name and description, flag "enable", put in your formula using the name you proided for the "X"-value, mark e.g. "insert after" and than attach to member and click on the ... to define in which position the new line shall apply. Dont forget to click on actions-> "Add" before you confirm with "ok". Makle sure your formula in excel does not contain ; but only , instead. Elsewise it is more or less the same than making normal formulas in excel
Alternative have a backend KF in Excel that you display above or below your averaging KF and check on that in your formula, if you really want to see a different average per each month - which I honestly doubt :-)
3) Backend-Workaround: well, if it must be really that flexible, you probably cannot work with aggregated level as you could if you had e.g. a quarterly average (search for the post on that, two possible solutions where given if I remember right).
And attrbute transformation will likely not help either. Would be more easy if you had one or few possible X-values restricted
Maybe someone else can find a workaround without LCode?
Yours
Irmi