vee_jess (10/22/2014)
Hi Chris,Thank you so much, seems to be doing the job however, the will be a broader dataset and more months. I would these records to the sample dataset
('2012-12-03','DM1','Monday',441),
('2012-12-03','DM3','Monday',10),
('2012-12-10','DM4','Monday',25),
('2013-12-02','DM1','Monday',1521),
('2013-12-03','DM4','Monday',4021),
('2013-12-03','DM4','Monday',25),
('2014-12-03','DM1','Thursday',1521),
('2014-12-03','DM3','Thursday',4021),
('2014-12-03','DM4','Thursday',25)
You don't have "month" anywhere on your report. Should it appear as a column in the output or as part of the title? It could be implicit - you could include the date in the title somewhere, and the users know that the report is for October 2014/2013/2012.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden