Forum Discussion

powerbiss's avatar
powerbiss
Helper I
4 years ago
Solved

Previous Year Sales

Hello, I am trying to calculate previous year's sales with the below sample data. I used the two formulas and didnt get the right answers. I also have a date table from 2018 to 2022 with date and ye...
  • v-easonf-msft's avatar
    v-easonf-msft
    4 years ago

    Hi, powerbiss 

    Try measuse as below:

    Last Year = 
    CALCULATE (
        SUM ( sales[Sales] ),
        FILTER ( 'sales', YEAR ( sales[Date] ) = YEAR ( TODAY () ) - 1 )
    )

     

    Best Regards,
    Community Support Team _ Eason