Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Prior/Last Year DAX same as Current Year

Good day   Can someone please advise where I am going wrong trying to calculate prior year values in my three dax-formulas below?   These three Sales LY should generate the same value, but it is ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    Try this formula. 'Table' is data table and 'date' is date table. I create a year column in the date table.

    Measure 2 = CALCULATE(SUM('Table'[value]),FILTER('Table',YEAR('Table'[date])=SELECTEDVALUE('date'[year])-1))

     

     

    Best Regards,

    Jay