I am trying to write a variable for the current year. Here is what I would like but it does not work. Please help me with the last part. I must admit to being fairly behind in learning to write variables into calculations. Our data has not really needed them and is pretty straight forward. I need to write one, now, though, quicker than it would take for me to learn them. Can someone help me write the following variable calculation.
Partial Prior Year =
VAR
FullYear = if the Max of ‘SalesPerformance'[OrderDate] is in the current year
then “Yes”
else “Yes” || “No”
Return
Calculate([Last Year Booked], [IsBeforeToday] = FullYear)
Basically, if the max order date is in the current year, I want to filter the calculation to dates that are before today and if the max order date is in a prior year, I do not want to filter any of the dates.