0
votes

I've got a few bar charts that shows 2 budget sets and an "actuals" for the year. Generally, I allow SSRS to automatically scale the charts, but we have 1 chart with a 1 month anomaly, where we had to budget a negative. This is unlikely to happen again, but I'd prefer to write an expression, rather than hard code a minimum.

SSRS is assigning the Y-Axis to -500, but the value is only -117, so I'd prefer to have the minimum be something along the lines of (MINIMUM Value * 1.2).

I found this question, SSRS Line Chart Dynamic Y Axis, and tried to adapt it to my needs, but failed. I tried the following expression in the Y-Axis Minimum: =iif(MIN(Sum(Fields!ForecastAmt.Value,"Chart3_CategoryGroup2"))<0,(MIN(Sum(Fields!ForecastAmt.Value,"Chart3_CategoryGroup2"))*1.2),Nothing)

1
It looks like it should work - I've done similar things in the past. Are you getting an error? Any warnings? What is the Axis' min value?Hannover Fist
Sorry for responding late, had a long weekend. I'm not receiving any error or warnings. The lowest value on the chart is -117.Boone

1 Answers

0
votes

I had a similar problem where I wanted the chart to handle the range and a rogue value was messing with the chart rendering.

Value of zero drops the y-axis min range to -20

My requirement is: if there is a value <= zero, set the min axis range to zero, else let the chart handle it and here is the expression

 =IIF(Min(Fields!MyField.Value, "MyDataSource") <= 0 OR Min(Fields!MyField.Value, "MyDataSource") <= 0, 0, "Auto")

Your expression looks mostly ok, perhaps remove the SUM()?