Forum Discussion

GretchenRW's avatar
GretchenRW
Frequent Visitor
1 year ago
Solved

Dynamically calculate previous year based on slicer

I'm trying to create a matrix visual that dynamically changes the current year calculations based on the year selected in a slicer. My data set contains data from 2023-2025 and I need to calculate YTD Sales, YTD Qty, Prior YTD Sales and Prior YTD Qty with the current YTD changing along with the date selected within the slicer. I've been able to calculate YTD for this year and create a -1 calculation to determine the prior year, but that is only working if 2025 is selected. I know there is a way to do this, I just can't find the right tutorial. Any help you can provide would be greatly appreciated.

5 Replies