Friendly Named Floating Schedule (Video Tip)

If you are building dashboards that are more real-time and relevant to the day you need to see this. In this video, I show how we can have a moving schedule visualization that always shows up-to-date information in a friendly way.

Here is the SQL code that I used to generate this table. You can run this code against any Microsoft SQL data connector and it will generate a nice 7-day table for you that is always the last 7 days.

SELECT CAST(GETDATE() as Date) as [Date], 'Today' as [FriendlyName]
UNION ALL
SELECT DATEADD(day, -1, CAST(GETDATE() as Date)) as [Date], 'Yesterday' as [FriendlyName]
UNION ALL
SELECT DATEADD(day, -2, CAST(GETDATE() as Date)) as [Date], FORMAT(DATEADD(day, -2, CAST(GETDATE() as Date)), 'dddd') as [FriendlyName]
UNION ALL
SELECT DATEADD(day, -3, CAST(GETDATE() as Date)) as [Date], FORMAT(DATEADD(day, -3, CAST(GETDATE() as Date)), 'dddd') as [FriendlyName]
UNION ALL
SELECT DATEADD(day, -4, CAST(GETDATE() as Date)) as [Date], FORMAT(DATEADD(day, -4, CAST(GETDATE() as Date)), 'dddd') as [FriendlyName]
UNION ALL
SELECT DATEADD(day, -5, CAST(GETDATE() as Date)) as [Date], FORMAT(DATEADD(day, -5, CAST(GETDATE() as Date)), 'dddd') as [FriendlyName]
UNION ALL
SELECT DATEADD(day, -6, CAST(GETDATE() as Date)) as [Date], FORMAT(DATEADD(day, -6, CAST(GETDATE() as Date)), 'dddd') as [FriendlyName]




By the way, here is the dashboard the next day after I recorded this. You can see that everything has properly shifted.




If you’d like to learn more, I’d recommend you go to my learning channel - Off the Charts (with Jeff).
https://www.dundas.com/resources/off-the-charts-tips-from-an-expert

4 Likes

Thanks for the tip Jeff!

Happy to share. I’d love to see some screenshots if anyone implements a full system like this.

1 Like

Thanks Jeff for the Tip