ssrs return latest 4th week
Posted on 2014-07-29
Not sure if this can be done, I have a report in SSRS (Report Builder 3).
I currently have a parameter called 'First Week' which returns 07/04/14 as the first Monday of April (our week 1) and I have a parameter called 'LastWeekNo' which at the moment returns 16 as last weeks no. I base most of our reports on whatever week number was last week (16 at the mo).
However some of my reports are monthly and are required to return the figures ONLY from the most recent 4th week , so for example the first 'monthly report' would have looked at our week 4, and kept looking at our week 4; until week 8, at which point it would then look at week 8, for 4 weeks, then it would change to week 12 and so on..
I'm sure there's a simple mathematical equation in there somewhere, but for the life of me I can't think of it!! I need to create a parameter that returns that most recent '4th week'!
Many thanks in advance!