0
votes

I have an SSRS line chart that I need to figure out how to hide empty data points - stop the line from making markers/continuing the line where Category Group values are zero:

enter image description here

The values and series and groups are setup as so:

enter image description here

With the data looking like this:

enter image description here

I have tried filtering both at the chart level and the Category Group levels to filter out data that would create groups for Series 2020 and Category October/November/December, this creating or filling those points in my mind:

enter image description here

Where the expression is "=DateSerial(YEAR(today()),MONTH(today()), 1)" achieving the net result of filtering out data points/rows that from an incomplete month - meaning when the report would be run on 10/10/2020, only data from before 10/1/2020 should be used to generate groups.

1

1 Answers

0
votes

The problem is that you are using COUNT() which will always return a value, zero if there are no records to count.

I created a simple dataset and using count of FILE_NUMBER I got this (replicating your issue) ...

enter image description here

The easiest way round this is to change the value expression to something like this...

enter image description here

enter image description here

=SUM(IIF(Fields!FILE_NUMBER.Value = Nothing, 0, 1))

This way we add 1 to the sum for every non-empty value and nothing if it's empty. If the total sum is still empty, by default, the chart will not plot that point.

So we end up with this...

enter image description here