Monday, 6 June 2016

Sparkline in SSRS


Sparkline:( Multiple values)


   Sparkline is kind of line report
 Usually data bar show single data value whereas Sparkline is used to indicate multiple data values over a
period of time.
 Here vertical axis represent value whereas horizontal axis usually represents time.
 Sparkline is intended to show the trend in measure values and how it is fluctuating.


Prepare Dataset : DataSet_Sparkline

SELECT DimDate.CalendarYear, DimProductCategory.EnglishProductCategoryName AS Category,
SUM(FactResellerSales.OrderQuantity) AS OrderQuantity, SUM(FactResellerSales.SalesAmount) AS
SalesAmount, AVG(FactResellerSales.SalesAmount) AS AvgSales, DimDate.EnglishMonthName,
DimDate.MonthNumberOfYear
FROM DimDate INNER JOIN FactResellerSales ON DimDate.DateKey = FactResellerSales.DueDateKey
INNER JOIN DimProduct ON DimProduct.ProductKey = FactResellerSales.ProductKey
INNER JOIN DimProductSubcategory ON DimProductSubcategory.ProductCategoryKey =
DimProduct.ProductSubcategoryKey INNER JOIN DimProductCategory ON
DimProductCategory.ProductCategoryKey = DimProductSubcategory.ProductCategoryKey
GROUP BY DimDate.CalendarYear, DimProductCategory.EnglishProductCategoryName,
DimDate.EnglishMonthName, DimDate.MonthNumberOfYear


Design :


now add a sparkline control--configure it 


output :


same as above we can can group it --Category wise also our sparkline. but above line showing overall salesmount. ( in 2002---may some month don't have sales then need to know --configure as monthwise)


now output :
Change Sparkline Type :  Column [ to know more clearly monthwise bars]



No comments:

Post a Comment