There will likely be times when you want to calculate performance year to date versus the same time period prior year to date.
The output might look something like this:
It takes a handful of calculations to do this. We’ll start by creating a year to date calculation:
Next we’ll create a previous year to date calculation:
The combination of the DATEPART() function and the ‘dayofyear’ date value is pivotal here. The way this works, 2/1/17 would be returned as day of year 32.
Last we’ll create a calculation that finds the growth percentage this year:
After adjusting the % growth calculation to have a percentage number format our results looks like this:
Need more help? Sign up for an office hour to get some extra help!