title: SSRS 2008 R2 - calculate Top 5% 10%, 20% etc in dynamic range in matrix
body: <p>I need to calculate the Top 5%, 10%, 20% and then the bottom 5%, 10%, 20% in a dynamic range in a matrix in SSRS 2008 R2.</p>
  
  <p>So I have data like this in my matrix:</p>
  
  <pre><code>               Week1    Week2   Week3   Week4
  Time  09:00     27       405     2       18
        10:00     12       1      1008     1098
        11:00     1002     10      76      102
  </code></pre>
  
  <p>So across those values I need to work out which of them fall into the top 10%, the bottom 10% or whatever. So if I were to add all of the numbers together shown above I would have a total of 3761. The range of individual values falls between the lowest amount (1) to the highest (1098). So how do I work out what % 'slot' 405 falls into and how do I make the report work this out when the numbers will be dynamic? I then need to use this calculation to highlight cells with some conditional formatting...</p>
  
  <p>Any help gratefully received and thanks in advance!</p>