Code DeCode

Calculate Week Ending in DAX and SQL

Hey all,

Its been a while and I am back with some more useful info. Lately been spending a lot of time playing with enterprise oracle databases. Before going any further shout out to our favorite search engine without which last month and half would have been pure torture, but instead it was a fun self learning experience.

To start things off I’ll share some code to convert DATE TIME data from a database to WEEK ENDING dates. Over the past month the one thing I have done to all the market tracking dashboards that I created was introduce a week ending date based on the transaction date. This allows us to put in a realistic interval to watch market activities. A month is too long to wait and a day is just too short, making a weekly data snapshot perfect to support business decisions.