Forum Discussion

vinissousa1's avatar
vinissousa1
New Member
4 years ago

Yearly performance based on monthly return

I am trying to calculate a yearly performance based on monthly returns. How to do that with dax? Anyone has a suggestion? 

2 Replies

  • vinissousa1 , try like

     

    MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

    last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))

     

     

    or create mesures like

     

    Total sales = SUM(Sales[Sales Amount])

    Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

    or
    Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

     

    and take diff %

     

  • I'm having problems with the matrix. How can I keep the matrix format I uploaded here? Can you send an example, pls?