SSRS 2008 R2 - Line chart labels - visibility based on expression?
I would like to control the visibility of a data label in a line chart using an expression. For example, I have a requirement to show the data label for two compariable data points in a line chart where the horizontal axis is time (Q1, Q2, Q3, etc...) and the data points are determined based on a selected parameter. The basic idea is that a user can select to view Q3 as the end point of reporting and the chart will graph a complete time line (e.g. FY 2001 thru FYXX Q3) but only show the label for Q3 and prior year Q3. I have tried to build an expression in the visibility property of 'Chart Series Labels' but this does not appear to work.
October 5th, 2010 7:27pm
Hi Jmcquil, From your information, I get that you want to display a different label based on the parameter you selected. We could type some expression to control the label’s content dynamically using the IIF function. Right-click the datafield in the Category Groups panel, and then select Category Group Properties, now you will see fx button behind of the Label and Group drop-down list, type in the expression (sample) =IIF(Parameters! Para.Value=”Value”, Fields!Datafield1.value, Fields!Datafield2.value) for both of them. Then you could control the chart’s group and label on the X-Axis based on the parameter you selected dynamically. Thanks, Challen Fu
October 8th, 2010 2:15pm