Reputation: 135
If I run a report running on SSRS / SQL Server 2008 R2, that charts data over a year, with data labels turned on, it looks like this, which is fine:
But when I change the time period of the report to run over 5 years, it looks like this, which is a mess:
Can someone tell me if there is a setting or something to change the maximum number of data labels show. You can see that SSRS has automatically filtered out many of the dates along the X axis, so that it looks ok; I want the same to happen with the data labels.
Many thanks.
Upvotes: 1
Views: 5301
Reputation: 1
Something to note: If this is for a continuous series you cannot use "RowNumber" as SSRS will only allow distinct values and not aggregates. To limit the value based on a date stamp on the x-axis: Right click series, show data labels, right click the data label in the chart, data label properties, and change the value to something like this: =iif(Minute(Fields!date_stamp_calculated.Value) = 0, Fields!TrailingTotal.Value, Nothing).
This looks for everything once an hour, you could beef up the if statement to include multiple intervals throughout the hour.
Upvotes: 0
Reputation: 11
I wanted to change it to show a data label for every other data point, and used the below code:
Highlight the data point and in the properties box Visible
enter
=IIF(RowNumber(Nothing) Mod 2 = 0, True, False)
This worked perfectly for me.
Upvotes: 0
Reputation: 1189
I wanted to change it to show a data label for every other data point, and used the below code:
Highlight the data point and in the properties box "Visible" enter
=IIF(RowNumber(Nothing) Mod 2 = 0, True, False)
Upvotes: 0
Reputation: 105
Calculate row counts which suit in your report. This would be used for limitation for complete shown data labels. For Example: (countrows("Dataset1")>20)
20 is the best number of records suits all data labels. Then set another criteria for how many labels which can be shown in high density labels.
For Example: RowNumber("Dataset1") mod 3 = 0
=iif((countrows("Dataset1")>20),iif((RowNumber("Dataset1") mod 3 = 0),Fields!PercentageOff.Value ,Nothing), Fields!PercentageOff.Value )
Upvotes: 4
Reputation: 137
I just wanted to share an alternative, as I just ran into this issue myself. For my chart, I have a Series group of "Budget Name", where there are 2 budgets and 1 "Actual". I wanted to display only the value of the Actual, so I used the following expression for the series label data:
=iif(Fields!Budget_Name.Value="ACTUAL",SUM(Fields!Amt.Value),Nothing)
Upvotes: 2
Reputation: 31
There is an option if you are using ssrs 2008 or later, the label visible property can be validated with an IIF or any other logical operator.
Upvotes: 3
Reputation: 3939
There is no option to limit the quantity of labels.
The only work around I can suggest is to remove the labels and add a tooltip with the value. It requires the user to roll over each point, but results in a usable report.
Upvotes: 1