DAX Practice: PREVIOUSYEAR and SAMEPERIODLASTYEAR
Monday, June 21st, 2021
We want to set the Units sold to be 10% higher than the prior year.
Open the Sales worksheet from Sales and Product Prior Year

Create a date table
Date = CALENDARAUTO()
On the modeling tab, relate the tables. This is necessary so that we can use Data[Date] as a filter for Sales.

Create a Goal measure
Goal = CALCULATE(sum(Sales[ Units]),PREVIOUSYEAR('Date'[Date]))*1.1
The 2019, 24 units were sold, so in 2020 our sales goal is 24 x 1.1 = 26.4.
Here’s another option:
GoalV2 = CALCULATE(sum(Sales[Units]),SAMEPERIODLASTYEAR('Date'[Date]))*1.1
