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 las...
  • micsafdas's avatar
    micsafdas
    6 years ago

    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