If you are building real-time dashboards that should be up on a big screen TV to show day-to-day information, you need to see this. This video shows how we can have a moving schedule visualization that always shows up-to-date information in a friendly style. The dashboard that I am creating shows manufacturing production information, but I imagine that anyone in an operations setting could benefit from something like this. The other benefit of this dashboard style is that it is built once and will always have up-to-date information.
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