Weekly Rolling Query

  • Hi all,

    I'm trying to write a simple SQL report which can be run every week to show the figures and still keep the previous week's numbers.

    Week Target Sales Total Actual Sales

    Up to 26 April 1,000 976

    Up to 3 May 1,100 1,163

    Up to 10 May 1,200 1,198

    I can easily run a report at the end of each week, which will show the Total Actual Sales, but I need a way to keep hold of this number so I can compare it when the report runs the following week.

    I'm hoping to use SSRS to build the report if this helps.

    Thanks!

  • Thanks Matan, interesting link and I think I've solved it.

    I was originally looking for a way to display historic data in an SSRS report, but I've now just added a Date Time field which gets stamped when the other field is checked.

    This has allowed me to run the report each week and show the results for the previous weeks.

  • Glad to help 🙂

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply