Help with measure - moving average - but not on dates

Job ID: 35205466

Budget: €8 – €30 EUR

Hi,

I have a measuer and struggeling to create a moving average, as the dates for the values are not continious.

VAR __verkFest = AVERAGE(LieferscheineUnique[Festigkeit])
VAR __fci = AVERAGE(LieferscheineUnique[fci_zu_PA])

VAR __avg = CALCULATE(AVERAGE(LieferscheineUnique[fci_zu_PA]),
FILTER(ALLSELECTED(LieferscheineUnique),
LieferscheineUnique[MATNR] = MAX (LieferscheineUnique[MATNR])),
FILTER(ALLSELECTED(LieferscheineUnique),
LieferscheineUnique[WERKS] = MAX (LieferscheineUnique[WERKS]
)) )
VAR __mwtrans = CALCULATE(
AVERAGEX(LieferscheineUnique,LieferscheineUnique[fci_zu_PA] - __avg),
LieferscheineUnique[fci_zu_PA] <> BLANK())

RETURN
__mwtrans + __avg - __verkFest

The rolling average based on dates is not possible here, as the rolling average based on count is needed, also the calculation needs to be dynamic, based on slicer settings.
I need the calculated values shown in a line graph.

If you are able to edit this measure to calculate the rolling average over the existing values, this project is done.

In case of any details required, just contact me.

Kind
Regards
Related categories: Excel Power BI