Forum Discussion

micsafdas's avatar
micsafdas
Frequent Visitor
6 years ago
Solved

Previous Year average and 2 year average

Hello!

I'm stuck and it would be great if you Experts could help me.

 

I do have a measure which calculates the monthly rents. What I would need is a average bar for the last and the second to last year.

 
 
 
 

The measure to calculate the monthly rent for reference:

Rent actual =
CALCULATE(SUM('Erlöse'[Betrag]); 'Erlöse'[Positionsart] IN { "Miete" })
 
If you need anything else to answer the question, I'm happy to share.
 
Thanks in advance!
  • I managed to solve it my self, once I got inspired by amitchandak's solution. 🙂

     

    Its

    Average last year = CALCULATE(SUM('Erlöse'[Betrag])/12;PREVIOUSYEAR(Datumstabelle[Date]);'Erlöse'[Positionsart] IN { "Miete" } )

    and

    Average second to last year = CALCULATE(SUM('Erlöse'[Betrag])/12;PARALLELPERIOD(Datumstabelle[Date];-2;YEAR);'Erlöse'[Positionsart] IN { "Miete" } )

     

    Simple as that... ^^

     

    Thanks all

6 Replies