title: SSRS Setting the "minimum" max value of a bar chart scale
body: <p>I am using SSRS 2014 and I have a requirement to make the max value for the y-axis scale of a chart always be <em>at least</em> 100. That is, if the none of the data in this horizontal bar chart reaches 100, my scale will still go to 100. However, if it exceeds 100, the max should be, well, Auto.</p>
  
  <p><a href="https://i.stack.imgur.com/LMhKR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LMhKR.png" alt="3D Stacked Bar Chart in SSRS"></a></p>
  
  <p>I can easily set the chart scale's <code>Maximum</code> property to 100, like shown in the chart above. Of course when my data exceeds 100, it gets truncated. So I thought about making the <code>Maximum</code> property an expression, where I decide if the Max bar height is greater than 100, set <code>Maximum</code> to <code>Auto</code>, otherwise, set it to 100. Only, I can't figure out how to get the "Max bar height" in an expression.</p>
  
  <pre><code>=IIF(MAX(Fields!CompletedWork.Value, "Chart3_CategoryGroup") &gt; 100, "Auto", 100)
  </code></pre>
  
  <p>This does not work for me. Chart3_CategoryGroup is the name of the category group in the stacked bar chart. I get the error that the scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.</p>
  
  <p>I am using a stacked bar chart and so my source data for this chart appears as:</p>
  
  <pre><code>Person   | Work Item Type  |  # of Hours
  ----------------------------------------
  Person A | Development     | 10
  Person A | Administration  | 2
  Person B | Development     | 8
  Person B | Deployment      | 4
  Person C | Testing         | 3
  </code></pre>
  
  <p>And so forth. Therefore my chart's series group is the Work Item Type, the Category group is the Person, and the Values are <code>[Sum(# of Hours)]</code>. The above <code>IIF</code> expression does not work if I use the series group in place of the category group either.</p>