Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Previous Quarter Calculation

How can I write Dax that will give me the average of Quarter 1's numbers below?:

 

It's tricky because when using the AVERAGE function, I'm not allowed to select my [Retention] measure for some reason, so I've been trying to find another way to calculate this and have so it is always calculating the average retention for the previous quarter.

  • Try AVERAGEX, something like:

     

    Measure = AVERAGEX(FILTER('Table',[Year]=2018 && [Quarter]="Qtr 1"),[Retention])

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Try AVERAGEX, something like:

     

    Measure = AVERAGEX(FILTER('Table',[Year]=2018 && [Quarter]="Qtr 1"),[Retention])
    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler Would this work the same if the dates I'm referencing are from a different table? The date columns come from a Date table while the retention comes from my fact table. Sorry, forgot to clarify that part.