March 18, 2014 at 2:33 pm
Hi all,
I need your help. I am trying to create rolling month table in SSRS report but I don’t know I where I am going badly. May be because of I am new learner in SSRS.
Below is my dataset & I showed how data looks in excel. I was doing this report in excel but my clients asked me to do in SSRS. I have given few excel tips for better understanding.
I need to create below table where data is rolling for 12 months. In excel I used few formulas to get data. I show in YELLOW color. I highlighted main group in Green color & sub group have white fill.
Can somebody please guide me step by step?
March 18, 2014 at 3:01 pm
Welcome aboard, young Jedi.
Any chance you could post some sample data? I'm not sure if I understand what you mean or are trying to achieve. (So a simple example would go a long way!)
Something like:
DECLARE @StartDate DATE = '6-1-2013';
SELECT InvoiceNo
, InvoiceDate
, Amount
FROM
(
SELECT 1001 AS InvoiceNo
, '3-1-2014' AS InvoiceDate
, 500.00 AS Amount
UNION ALL
SELECT 1002 AS InvoiceNo
, '3-2-2014' AS InvoiceDate
, 1500.00 AS Amount
UNION ALL
SELECT 1003 AS InvoiceNo
, '6-2-2013' AS InvoiceDate
, 2500.00 AS Amount
UNION ALL
SELECT 1002 AS InvoiceNo
, '3-2-2013' AS InvoiceDate
, 5500.00 AS Amount) x
-- Add one year to the date and subtract one day.
WHERE x.InvoiceDate BETWEEN @StartDate AND DATEADD(d,-1,DATEADD(y,1,InvoiceDate));
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply