One small issue with this logic: eval day_number=floor(day/7)+1 As it results in the 7th, 14th, 21st, and 28th reporting in the following week. Week 1 should be days 1-7, 2 would be 8-14, etc. You need to modify it slightly to land those days on the proper week because they're evenly divisible and result in a +1 to the week they're actually in. eval day_number=floor((day-1)/7)+1 And this is an old post, but since I'm using this logic and much appreciate the solution, thought I'd point out the slight tweak needed for it to work 100% if anyone searches in the future.
... View more