# DP macros, calculating average values over a period of time

Hello

I have a key figure row, for the future i want this key figure to contain the average of a different key figure row over the last year.

How would you go about calculating the average value of a key figure row over a period of time and then assigning this value to another key figure?

I've tried variatons of AVG() and SUM() & SUM_CALC a but none of them seem to get me anywhere, i may not understand completely how rows & values work so any tips would be helpful.

Iin pseudo-logic: what i need to do is:

Calculate the average value of a key figure row over a given period (the last year)

Store this value somewhere, in regular programming it'd be a variable of some kind.

Assign this value to another key figure row 18 months into the future.

Regards

Simon Pedersen