Forum Discussion
Previous Years vs Current Year
Did you get it resolved? I have the same issue with blank....
I had this problem as discussed in this thread https://community.powerbi.com/t5/Desktop/SAMEPERIODLASTYEAR-with-a-year-filter/td-p/91501
What's happening is that your filter on the year is also making the previous year data unavailable. You need to use FILTER within your calculation to release the filter on the previous year's data and make it available to the calculation.
This is the calculation that worked for me.
TotalRevenueThisPeriodLY = CALCULATE(SalesDataAggregated[TotalRevenue], FILTER(ALL(Dates), Dates[CalendarYear] = MAX(Dates[CalendarYear])-1), SAMEPERIODLASTYEAR(Dates[Date]))
I was using SAMEPERIODLASTYEAR, but you can use whatever you need.
The important point is the CALCULATE on the outside and the FILTER(ALL(Dates), ...) as the second argument on the inside.
FILTER(ALL(Dates)...) is removing your 2015 filter temporarily for this calculation, and expanding it to the entire Dates table so that it can access and calculate the previous year's value.