Forum Discussion
vanessafvg
9 years agoCommunity Champion
SAMEPERIODLASTYEAR not working as expected
I have this calcualted measure, but it doesn't bring anything back - i can see data for last year so its a bit odd PY Revenue = CALCULATE(sum(Sales[RevenueNettAmount]), SAMEPERIODLASTYEAR('Fiscal D...
- 9 years ago
My guess on this is that you are filtering Fiscal Date[Date] through your slicers and so when you feed it to SAMEPERIODLASTYEAR in a measure, it is filtered to a single month/year and thus all of last year's information is not there. I would try wrapping an ALL around 'Fiscal Date'[Date]) to remove any slicer filter context.
Greg_Deckler
9 years agoCommunity Champion
My guess on this is that you are filtering Fiscal Date[Date] through your slicers and so when you feed it to SAMEPERIODLASTYEAR in a measure, it is filtered to a single month/year and thus all of last year's information is not there. I would try wrapping an ALL around 'Fiscal Date'[Date]) to remove any slicer filter context.
Anonymous
4 years agoNot applicable
Great solution! Thanks.