This allows 2/3 slicers as above and has the benefit of:
-My measures are set to calcuate over the "Comp Type" field so I have 1 measure per calc (often total sales, % of total and % diff over previous time span)
-The Legend automatically updates to "Time Span" field.
What I am struggling with is the year input - this obviously only works for 2021 v 2020 and I'd like the end user to have 2 drop down slicers to choose which 2 years they'd like to focus on.
I can't figure out a way to do this without needing to somehow make the "Comp Type" Dynamic (I guess using smaller year as prior, larger year as current - but I dont think it can work like this?), or use further ADDCOLUMNS for each permutation of the year combinations (w a column of Y1 and Y2).
As this date table is already huge and slightly laggy to work with, and it's only February I am concerned about the second option.
I have experimented with using 2 What-If parameters as the Date(year( input driver in the variable setup (so tried to use them in the same way as a Tableau parameter) but this doesn't seem to work- I get 2017 - 2021 listed perfectly in the parameter table, but the dates that pull through in the Selection Data table are 1899-1900. I've tried VALUES, VALUE, SELECTEDVALUE, MIN, MAX in additional columns/measures to try and make this work but no luck.
I've also tried using the timeline add in which almost has what I want from a user end functionality but seems to require multiple measures again.
I'd be grateful to hear anyone's suggestions - I know I probably need to come round to another way of thinking, but I just can't seem to figure out how people do any useful analysis over time!