SSRS Chart: Filtering and controlling axis maximum

Jimmy picture Jimmy · Jul 11, 2013 · Viewed 9.1k times · Source

I am creating a chart off in SSRS based on software version usage per month. I would like to compare how often each version is used per month in comparison to other versions. The image I'm working with is below:

enter image description here

Obviously with one version being used so highly, it visually skews my data, making the rest of the data harder to see. I am curious if there is any way to do the following things in SSRS:

  • Having the user Toggle /select/choose which versions they would like to appear on the chart, with the chart then automatically adjusting its Y-Axis settings

  • Having the user adjust the y-axis settings themselves, thus being able to get a closer look or a zoomed out look of the data.

Answer

Ian Preston picture Ian Preston · Jul 12, 2013

There are a few questions here.

Here's my base report:

enter image description here

Parameter-based axis

You can definitely set axis limits with a parameter. I created a parameter called AxisLimit and set Maximum property to use this parameter under Axis Options -> Set axis scale and style:

enter image description here

Works as required:

enter image description here

Filtering by parameter

You can also set up the report to filter values based on a user selection.

You can apply this to the DataSet in the query text or as a parameter to an underlying stored procedure.

If you need the data elsewhere in the report and can't apply this at the DataSet level, you can set up a filter at the chart level. I set up a multi-value parameter called Groups which contains the groups in the DataSet.

At the report I set the filter as:

enter image description here

Where the expression is:

=IIf(InStr(Join(Parameters!Groups.Value, ",")
  , CStr(Fields!grp.Value)) > 0
  , "INCLUDE", "EXCLUDE")

Here I use the Join function to get the list of selected parameters values, then filter the DataSet based on these. Again, works as required:

enter image description here

Scale breaks

One option you might not have considered is Scale Breaks, which is meant to help with this sort of data:

enter image description here

enter image description here

Maybe this will help, too.