Thanks in advance for taking the time to read this!
I have a rather large data set, containing over 20,000 records and I am looking to calculate the percentile ranking of 10 to 20 different statistics for each record, in each category, if the statistic exists. Of these 20,000 records, I can break them into 30 different categories. The ranking is specific to the category, not to the entire data set.
On a smaller scale, the resulting sample data might look like this:
<table width="399" border="0" cellpadding="0" cellspacing="0"><col style="width: 16pt;" width="21"> <col style="width: 45pt;" width="60"> <col style="width: 29pt;" width="38"> <col style="width: 51pt;" width="68"> <col style="width: 29pt;" width="38"> <col style="width: 51pt;" width="68"> <col style="width: 29pt;" width="38"> <col style="width: 51pt;" width="68"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 16pt;" width="21" align="center" height="20">id</td> <td style="width: 45pt;" width="60" align="center">category
</td> <td style="width: 29pt;" width="38" align="center">Stat1
</td> <td style="width: 51pt;" width="68" align="center">Stat1Rank
</td> <td style="width: 29pt;" width="38" align="center"> Stat2</td> <td style="width: 51pt;" width="68" align="center"> Stat2Rank
</td> <td style="width: 29pt;" width="38" align="center">Stat3</td> <td style="width: 51pt;" width="68" align="center"> Stat3Rank</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">1</td> <td class="xl65" align="center">1</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">4</td> <td class="xl65" align="center">0</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">2</td> <td class="xl65" align="center">1</td> <td class="xl65" align="center">4</td> <td class="xl65" align="center">33</td> <td class="xl65" align="center">6</td> <td class="xl65" align="center">50</td> <td class="xl65" align="center">8</td> <td class="xl65" align="center">100</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">3</td> <td class="xl65" align="center">1</td> <td class="xl65" align="center">6</td> <td class="xl65" align="center">66</td> <td class="xl65" align="center">9</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">4</td> <td class="xl65" align="center">1</td> <td class="xl65" align="center">8</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">5</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">-2</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">4</td> <td class="xl65" align="center">0</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">6</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">-4</td> <td class="xl65" align="center">75</td> <td class="xl65" align="center">6</td> <td class="xl65" align="center">33</td> <td class="xl65" align="center">8</td> <td class="xl65" align="center">50</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">7</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">-6</td> <td class="xl65" align="center">50</td> <td class="xl65" align="center">9</td> <td class="xl65" align="center">66</td> <td class="xl65" align="center">12</td> <td class="xl65" align="center">100</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">8</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">-8</td> <td class="xl65" align="center">25</td> <td class="xl65" align="center">12</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">9</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">-10</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">10</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">-3</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">4</td> <td class="xl65" align="center">0</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">11</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">4</td> <td class="xl65" align="center">11</td> <td class="xl65" align="center">-6</td> <td class="xl65" align="center">75</td> <td class="xl65" align="center">8</td> <td class="xl65" align="center">33</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">12</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">6</td> <td class="xl65" align="center">22</td> <td class="xl65" align="center">-9</td> <td class="xl65" align="center">50</td> <td class="xl65" align="center">12</td> <td class="xl65" align="center">66</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">13</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">8</td> <td class="xl65" align="center">33</td> <td class="xl65" align="center">-12</td> <td class="xl65" align="center">25</td> <td class="xl65" align="center">16</td> <td class="xl65" align="center">100</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">14</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">10</td> <td class="xl65" align="center">44</td> <td class="xl65" align="center">-15</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">15</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">12</td> <td class="xl65" align="center">55</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">16</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">14</td> <td class="xl65" align="center">66</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">17</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">16</td> <td class="xl65" align="center">77</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">18</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">18</td> <td class="xl65" align="center">88</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">19</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">20</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> </tbody></table>
I am trying to automate the calculation of the Stat1Rank, Stat2Rank and Stat3Rank columns. The first problem I am having in automating this task is that the number of records in each category changes every month. I want to make sure I am calculating the Percent Rank on the entire category without having to edit the formula each month. Also, if a record does not contain a value in the Stat1 column, I don't want it included in the ranking calculation in the Stat1Rank column.
Is there a way I can define my range in the Percentile Rank Function as all records in Category 1 that have an entry in the Stat1 column?
Would this task be possible or better in Access?
Any help would be greatly appreciated!
Thank You
I have a rather large data set, containing over 20,000 records and I am looking to calculate the percentile ranking of 10 to 20 different statistics for each record, in each category, if the statistic exists. Of these 20,000 records, I can break them into 30 different categories. The ranking is specific to the category, not to the entire data set.
On a smaller scale, the resulting sample data might look like this:
<table width="399" border="0" cellpadding="0" cellspacing="0"><col style="width: 16pt;" width="21"> <col style="width: 45pt;" width="60"> <col style="width: 29pt;" width="38"> <col style="width: 51pt;" width="68"> <col style="width: 29pt;" width="38"> <col style="width: 51pt;" width="68"> <col style="width: 29pt;" width="38"> <col style="width: 51pt;" width="68"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 16pt;" width="21" align="center" height="20">id</td> <td style="width: 45pt;" width="60" align="center">category
</td> <td style="width: 29pt;" width="38" align="center">Stat1
</td> <td style="width: 51pt;" width="68" align="center">Stat1Rank
</td> <td style="width: 29pt;" width="38" align="center"> Stat2</td> <td style="width: 51pt;" width="68" align="center"> Stat2Rank
</td> <td style="width: 29pt;" width="38" align="center">Stat3</td> <td style="width: 51pt;" width="68" align="center"> Stat3Rank</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">1</td> <td class="xl65" align="center">1</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">4</td> <td class="xl65" align="center">0</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">2</td> <td class="xl65" align="center">1</td> <td class="xl65" align="center">4</td> <td class="xl65" align="center">33</td> <td class="xl65" align="center">6</td> <td class="xl65" align="center">50</td> <td class="xl65" align="center">8</td> <td class="xl65" align="center">100</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">3</td> <td class="xl65" align="center">1</td> <td class="xl65" align="center">6</td> <td class="xl65" align="center">66</td> <td class="xl65" align="center">9</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">4</td> <td class="xl65" align="center">1</td> <td class="xl65" align="center">8</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">5</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">-2</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">4</td> <td class="xl65" align="center">0</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">6</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">-4</td> <td class="xl65" align="center">75</td> <td class="xl65" align="center">6</td> <td class="xl65" align="center">33</td> <td class="xl65" align="center">8</td> <td class="xl65" align="center">50</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">7</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">-6</td> <td class="xl65" align="center">50</td> <td class="xl65" align="center">9</td> <td class="xl65" align="center">66</td> <td class="xl65" align="center">12</td> <td class="xl65" align="center">100</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">8</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">-8</td> <td class="xl65" align="center">25</td> <td class="xl65" align="center">12</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">9</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">-10</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">10</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">2</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">-3</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">4</td> <td class="xl65" align="center">0</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">11</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">4</td> <td class="xl65" align="center">11</td> <td class="xl65" align="center">-6</td> <td class="xl65" align="center">75</td> <td class="xl65" align="center">8</td> <td class="xl65" align="center">33</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">12</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">6</td> <td class="xl65" align="center">22</td> <td class="xl65" align="center">-9</td> <td class="xl65" align="center">50</td> <td class="xl65" align="center">12</td> <td class="xl65" align="center">66</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">13</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">8</td> <td class="xl65" align="center">33</td> <td class="xl65" align="center">-12</td> <td class="xl65" align="center">25</td> <td class="xl65" align="center">16</td> <td class="xl65" align="center">100</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">14</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">10</td> <td class="xl65" align="center">44</td> <td class="xl65" align="center">-15</td> <td class="xl65" align="center">0</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">15</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">12</td> <td class="xl65" align="center">55</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">16</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">14</td> <td class="xl65" align="center">66</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">17</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">16</td> <td class="xl65" align="center">77</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">18</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">18</td> <td class="xl65" align="center">88</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" align="center" height="20">19</td> <td class="xl65" align="center">3</td> <td class="xl65" align="center">20</td> <td class="xl65" align="center">100</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> <td class="xl65" align="center">
</td> </tr> </tbody></table>
I am trying to automate the calculation of the Stat1Rank, Stat2Rank and Stat3Rank columns. The first problem I am having in automating this task is that the number of records in each category changes every month. I want to make sure I am calculating the Percent Rank on the entire category without having to edit the formula each month. Also, if a record does not contain a value in the Stat1 column, I don't want it included in the ranking calculation in the Stat1Rank column.
Is there a way I can define my range in the Percentile Rank Function as all records in Category 1 that have an entry in the Stat1 column?
Would this task be possible or better in Access?
Any help would be greatly appreciated!
Thank You