Forum Discussion

lherbert501's avatar
lherbert501
Post Prodigy
2 years ago

SAMEPERIODLASTYEAR Months Selected

Hi,

 

Could somebody please help me with my dax to get sameperiodlastyear but to match whatever is selected in the slicer?

 

The slicer is at month/period level. E.G if I select December 2023 I want to see all from December 2022. If I select Oct,Nov,Dec 2023 I want the same calculation for the same 3 months, the year before.

 

I have the total measure and date calender set up. All of my data is in YYYYMM format but I do have a calender table.

 

Thanks

 

Liam

5 Replies