title: How do I implement SSRS Y-Axis like a subquery?
body: <p>I have a report that pulls from a stored procedure. The SP takes a good 3 minutes to run, so I don't want to hit the DB to pull this information more than once. I should already have it in the dataset, so how can I juggle it to get these percents (if at all)?</p>
  
  <p>I have the data in a dataset, and I display a chart based on that data so I can't alter the dataset directly. I need all of the information as it stands. All is well so far. Now, At the bottom of the report, I want a line chart that shows the number of rows that went over a threshold as compared for the ones that did NOT go over that threshold for a given week number. WeekNumber is already a column I collect in my stored proc.</p>
  
  <p>I already have category groups set as WeekNumber, so I believe that my X-Axis should already be set to that. Now, I need to set my Y axis to a percentage of the values that went outside the bounds for that specified week.</p>
  
  <p>My Y-Axis values would then be something like:</p>
  
  <pre><code>OveragePercent=FormatPercent(
                 (SELECT COUNT(0) FROM ThisWeek WHERE DataSet1.Threshold &gt; 50) /
                 (SELECT COUNT(0) FROM ThisWeek WHERE DataSet1.Threshold &lt; 50), 2)
  </code></pre>
  
  <p>Any thoughts or suggestions would be appreciated.</p>