Creating multiple dynamic charts based on a group of values can be easily done by a matrix in SSRS. In that way it won’t be required to change design when new entries are added to the dataset. In addition to that, group value can be used to filter data in the chart. So using one dataset we can achieve this task.
Here we have an example from AdventureWorks db. I have written a simple query to get all the items grouped by their color, quantity and related product category.
What we need to display using this data set ?
I need a separate column chart which will display total value by color, for each product category.
How we are going to achieve this ?
It needs to be dynamic charts which will change according to number of items in product category, therefore we cannot create multiple charts. So basic solution would be to create matrix and insert a chart inside data column.
Steps
First of all insert a matrix to the report and set ProductCategory as row group. Then add a chart inside the data column just like below figure.
Once chart is inserted, we need to set color and total value fields accordingly just as a basic column chart. Set the chart title as ProductCategory column.
That’s pretty much all. But it’s better to hide first column in the matrix and format matrix border colors, so it won’t look like a table. Let’s see how it looks in the preview.