Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

12 Months Rolliing Table in SSRS Expand / Collapse
Author
Message
Posted Tuesday, March 18, 2014 2:33 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, April 24, 2014 8:44 AM
Points: 4, Visits: 23
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?


  Post Attachments 
DATASET1.PNG (6 views, 21.81 KB)
Table.PNG (4 views, 19.23 KB)
Post #1552402
Posted Tuesday, March 18, 2014 3:01 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 1:01 AM
Points: 929, Visits: 5,908
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));

Post #1552414
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse