Sparklines are small charts that you can embed into cells of a table or matrix. Because of their size, they do not show labels or a legend, although there are many similarities with the charts you use in other parts of a report.
Because of their small size and lack of labels, sparklines are best used to show trends over time, or for comparing rows of data. In the example used in this section’s Try it, the sparkline will show trends of sales over a year for each salesperson. The reader will be able to see which salesperson is increasing sales over the year, but the sparkline will not provide any values.
If you would like to become an SSRS (SQL Server Reporting Services) certified professional, then visit Mindmajix - A Global online training platform: "SSRS Training and Certification Course". This course will help you to achieve excellence in this domain.
Because sparklines use a series of data values, they must be placed in a cell that is part of a group.
Because sparklines are usually used to compare data presented in a column, it is common to align the data points with other sparklines in that column so that the reader can quickly look down the column and compare rows.
Try it
1. Create a new report called Sparklines with a report data source that references the shared data source in the project.
2. Create a dataset with this query:
SELECT
MONTH(soh.OrderDate) AS [Month],
p.FirstName + p.LastName AS FullName,
SUM(soh.TotalDue) AS TotalDue
FROM
Sales.SalesOrderHeader soh
INNER JOIN Person.Person p
ON p.BusinessEntityID = soh.SalesPersonID
WHERE
YEAR(soh.OrderDate) = 2007
GROUP BY
p.FirstName + p.LastName,
MONTH(soh.OrderDate)
ORDER BY
[Month],
FullName
(Related Page: SQL Server Reporting Services SSRS Indicators)
3. Drag a Matrix onto the report design surface
4. From the dataset, drag Month onto the Column cell, FullName onto the row cell, and TotalDue onto the data cell
5. Preview the report and supply the year parameter to check that it shows one row for each person, and one column for each month, with the total sales in the data cells
6. Back in Design view, right-click on the Month column header and choose Insert Column > Outside Group – Right.
7. From the Toolbox, drag a Sparkline onto the second row of the new column.
8. Select the default column type and click ok
9. Click on the sparkline to open the Chart Data window and use the + icon to add the TotalDue field to the list of values.
10. Add a category group and select Month.
11. Right-click on the sparkline and choose Horizontal Axis Properties.
12. Tick the box to ‘Align axes in’ and accept the default selection (which will be the name of the Matrix). Click OK and preview the report.
(Related Page: How To Format a Table Report in SSRS)
Frequently Asked SSRS Interview Questions & Answers
SSIS | Power BI |
SSAS | SQL Server |
SCCM | SQL Server DBA |
SharePoint | BizTalk Server |
Team Foundation Server | BizTalk Server Administrator |
Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:
Name | Dates | |
---|---|---|
SSRS Training | Nov 23 to Dec 08 | View Details |
SSRS Training | Nov 26 to Dec 11 | View Details |
SSRS Training | Nov 30 to Dec 15 | View Details |
SSRS Training | Dec 03 to Dec 18 | View Details |
Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.