Getting Started with Adobe After Effects - Part 6: Motion Blur

Upload Image Close it
Select File

Welcome to my blog. I work as Database lead at Synaptic Digital. Hope you find some interesting stuff here.
Browse by Tags · View All
BRH 17
SQL Server 15
#SQL Server 11
#BI 10
BI 7
#SQLServer 6
SSRS 2008R2 5

Archive · View All
January 2011 6
December 2010 5
September 2012 4
May 2012 4
March 2011 4
November 2012 2
October 2012 2
January 2012 2
February 2011 2
November 2010 2

Add a moving average trend-line to Bar/Column Chart in SSRS

Dec 2 2010 1:26AM by Chintak Chhapia   

We can create a column chart in SSRS and sometimes we also need add line over bar chart to display average. In this post, we will see how we can add trend line.  I have used SSRS 2008.

We will create column chart which will display the sales amount for each month for year 2004.

Setp-1:- Create DataSet Query 

USE AdventureWorksDW 
SELECT MonthNumber = dt.MonthNumberOfYear 
, SalesAmount = SUM(fs.SalesAmount) 
FROM dbo.FactInternetSales FS 
INNER JOIN dbo.DimTime dt ON FS.OrderDateKey = dt.TimeKey 
WHERE dt.FiscalYear = 2004 
GROUP BY dt.MonthNumberOfYear 
ORDER BY dt.MonthNumberOfYear 

Note:- Here there is no need to  compute SUM, we can do this in SSRS. But, always good to do computation in SQL.

Setp-2:-Create a Bar chart
Now, we need to start Report Builder or BIDS and add column chart to this. We need to put “SalesAmount” in Data field and “MonthNumber ” in category filed.
Also, to display Month name we need to change label property of category group property to “MonthName(Fields!MonthNumber.Value,True)”.

Setp-3:- Now we need to add moving average line to this chart, so that analyst can see the trend.

3.1) Click on sum(salesAmount) and select add calculated series.

3.2) Select Moving average from the drop down box

3.3) Change the Legend of calculated series. If we want to change color then we can also change Fill property to change color of line.

This way we can add trend line to bar/column chart.

Updated:- To see how to add simple average line please visit next post



Tags: BRH, #SQLServer, BI, #BI, SSRS, Trendline, Bar Chart, Average Line, Column Chart, #SSRS, #TSQL,

Chintak Chhapia
40 · 5% · 1477


Your Comment

Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]