Hi all, I hope you can help. I have a customer (Bakery) who has sales figures, and he wants to see his sales for specific products over the last X Tuesdays/Wednesdays, to see when he sells out of these products so he can order more/less for the following day week.
How would I do this with a parameter, so I can then group this in to a comparison-like report.
Would it be easier to do it in the SQL Query?
Edit - I'm thinking of having a parameter for the day and the amount of days to list, but I can't get the SQL syntax right, can you do a top on a datapart? Like below:
'AND Top @XWeeksToRun DatePart(dw,SessionDate) = @Day'
Also, will DatePart(dw) group all Tuesdays in to a single lump, or do separate lines for each different day? I need it to group by the date so you can compare them.