I have a line graph that shows % on the Y axis and dates on the X.
The graph has a static filter on it that is set to only show dates where the week offset is greater than or equal to -52 (i.e. showing a year of data).
I want to show have a line on the X-Axis that shows where the week offset is equal to -4 (i.e. 4 weeks ago).
I created the following Measure
Week End Date 4 Weeks Ago =
VAR OneWeekEndSelected = HASONEVALUE(Dates[WeekEnding])
VAR SelectedWeekOffset = IF(OneWeekEndSelected=TRUE,VALUES(Dates[WeekOffset]),99)
VAR WeekOffSet4WeeksAgo = SelectedWeekOffset-3
VAR Date4WeeksAgo = LOOKUPVALUE(Dates[WeekEnding],Dates[WeekOffset],WeekOffSet4WeeksAgo)
When I look at thie value in a Card it is correct.
When I add this to the X-Axis Constant Line as a Conditional Fomat, it does not show.
If I manually type in the date and do not use the Conditional Fomat optoin the lines shows as I want. However as the data grows week on week then next week the fixed date will be 5 weeks and not 4 weeks ago.
Can anyone advise why the line is not showing when I use a method?