I am doing a year over year comparison of two different products' sales performance. The data is pulled from a single SQL server table and is split into current and prior year by filtering on the following calculated field:
IF year([Friday of Week Sold]) = YEAR(TODAY())-1 THEN
IF [Product Type] = "A" THEN "PY Product A"
ELSEIF [Product Type] = "B" THEN "PY Product B"
END
ELSEIF year([Friday of Week Sold]) = YEAR(TODAY()) THEN
IF [Product Type] = "A" THEN "CY Product A"
ELSEIF [Product Type] = "B" THEN "CY Product B"
END
END
(calculated field inspired by blogpost here)
The end result is the chart below:
what I'm trying to figure out is if there is a way to change the display of the x-axis so that it lists the current year week-end dates rather than the week number; e.g. display "Week 1" as "1/4/19", "Week 2" as "1/11/19", etc. Changing the datatype to week doesn't work as it then splits the data in two like so:
and I'm trying to keep the lines overlaid on each other to make it easy for users to compare.
I am OK with the minor variance in dates from this (Week 1 in 2019 ends 1/4/19 vs Week 1 of 2018 ending 1/5/18). The goal is to enable end users to make a quick, rough comparison of our performance this week vs last year.