Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Need help: average

Hi, 

 

I calculated the amount of items rejected with the following dax: 

Afgekeurde flowpacks = 
COUNTX(Espera; Espera[Index])

This value is filtered with a date filter on the page.

 

I would like to DAX a running average over the last 2 months,

 

Could someone help me out on this?

3 Replies

  • It should help somethink like:


    Measure:=
    CALCULATE(Afgekeurde flowpacks,FILTER(Date,Date[Calendar Date]>=DATEADD ( 'Date'[Calendar Date], -2, MONTH )))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi gipiluso,

       

      I used your formula and it gave me the following result.

       

       

       

       

      I believe we must modify it in a way that it calculates the average 'afgekeurde flowpacks' per line over a period of 2 months.

       

      Any clue how? 

       

      • gipiluso's avatar
        gipiluso
        Resolver II

        I think that the current measure perform the calculation on the 2 month before, in the report you should se the average of the 2 month collapsed in each point.