Forum Discussion
Using Custom Dates for Visuals based on FIltered Report Date
- Anonymous3 years ago
Hi Kurt_C ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
CALENDAR = CALENDAR(DATE(2023,1,1),DATE(2023,12,31))(2) We can create a measure.
Flag = SWITCH(TRUE(), MAX('Table'[date])=SELECTEDVALUE('CALENDAR'[Date])-1,1, MAX('Table'[date])=SELECTEDVALUE('CALENDAR'[Date])-2,2, MAX('Table'[date])=SELECTEDVALUE('CALENDAR'[Date])-3,3, MAX('Table'[date])=SELECTEDVALUE('CALENDAR'[Date])-4,4, MAX('Table'[date])=SELECTEDVALUE('CALENDAR'[Date])-5,5)(3) Create five line graphs, then filter the visual objects with [Flag]=1/2/3/4/5, and select different dates on the slicer without changing the visual objects again.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Kurt_C ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
CALENDAR = CALENDAR(DATE(2023,1,1),DATE(2023,12,31))
(2) We can create a measure.
Flag = SWITCH(TRUE(),
MAX('Table'[date])=SELECTEDVALUE('CALENDAR'[Date])-1,1,
MAX('Table'[date])=SELECTEDVALUE('CALENDAR'[Date])-2,2,
MAX('Table'[date])=SELECTEDVALUE('CALENDAR'[Date])-3,3,
MAX('Table'[date])=SELECTEDVALUE('CALENDAR'[Date])-4,4,
MAX('Table'[date])=SELECTEDVALUE('CALENDAR'[Date])-5,5)
(3) Create five line graphs, then filter the visual objects with [Flag]=1/2/3/4/5, and select different dates on the slicer without changing the visual objects again.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Kurt_C3 years agoNew Member
This worked great thank you. It was odd because the data didn't show until I added the date to the legend, I'll have to explore why that is. Outside of tweaking the formula to ignore weekends this was perfect. Very much appreciated!