Hi,
Summary: I need help calculating the 50th percentile of a given array where the array is determined by using a reference to a primary key.
Table 1 contains base salary values based on various positions associated with various companies. This table is structured so that the table header is the Company ID number and the rows are the Position ID number. Please see the following example:
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD][/TD]
[TD]1[/TD]
[TD]2 [/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]AAA[/TD]
[TD]100[/TD]
[TD]132[/TD]
[TD]127[/TD]
[TD]115[/TD]
[TD]135[/TD]
[/TR]
[TR]
[TD]AAB[/TD]
[TD]45[/TD]
[TD]51[/TD]
[TD]48[/TD]
[TD]55[/TD]
[TD]43[/TD]
[/TR]
</tbody>[/TABLE]
Table 2 contains a list of parameters and the Company ID the is associated with each parameter (the same Company ID may be used more than once due to the nature of the parameter). Please see the following example:
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]Parameter[/TD]
[TD]Co. ID[/TD]
[/TR]
[TR]
[TD]Criteria 1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Criteria 1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Criteria 1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Criteria 1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Criteria 1[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Criteria 2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Criteria 2[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Criteria 2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Criteria 2[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
My goal is to find the 50th percentile of the base for each position within Table 1 based on the specified parameters established within Table 2. From here, I will create a table that contains all Position IDs and all company Parameters where the Base Salary 50th Percentile will generate the value based on the combination of Column [A] and Column . The end goal will look something like this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][A]Position ID[/TD]
[TD]Parameter[/TD]
[TD][C]Base Salary 50th Percentile[/TD]
[/TR]
[TR]
[TD]AAA[/TD]
[TD]Criteria 1[/TD]
[TD]127[/TD]
[/TR]
[TR]
[TD]AAA[/TD]
[TD]Criteria 2[/TD]
[TD]121[/TD]
[/TR]
[TR]
[TD]AAB[/TD]
[TD]Criteria 1[/TD]
[TD]48[/TD]
[/TR]
[TR]
[TD]AAB[/TD]
[TD]Criteria 2[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]
Thank you in advance for your assistance!
Summary: I need help calculating the 50th percentile of a given array where the array is determined by using a reference to a primary key.
Table 1 contains base salary values based on various positions associated with various companies. This table is structured so that the table header is the Company ID number and the rows are the Position ID number. Please see the following example:
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD][/TD]
[TD]1[/TD]
[TD]2 [/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]AAA[/TD]
[TD]100[/TD]
[TD]132[/TD]
[TD]127[/TD]
[TD]115[/TD]
[TD]135[/TD]
[/TR]
[TR]
[TD]AAB[/TD]
[TD]45[/TD]
[TD]51[/TD]
[TD]48[/TD]
[TD]55[/TD]
[TD]43[/TD]
[/TR]
</tbody>[/TABLE]
Table 2 contains a list of parameters and the Company ID the is associated with each parameter (the same Company ID may be used more than once due to the nature of the parameter). Please see the following example:
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]Parameter[/TD]
[TD]Co. ID[/TD]
[/TR]
[TR]
[TD]Criteria 1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Criteria 1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Criteria 1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Criteria 1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Criteria 1[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Criteria 2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Criteria 2[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Criteria 2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Criteria 2[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
My goal is to find the 50th percentile of the base for each position within Table 1 based on the specified parameters established within Table 2. From here, I will create a table that contains all Position IDs and all company Parameters where the Base Salary 50th Percentile will generate the value based on the combination of Column [A] and Column . The end goal will look something like this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][A]Position ID[/TD]
[TD]Parameter[/TD]
[TD][C]Base Salary 50th Percentile[/TD]
[/TR]
[TR]
[TD]AAA[/TD]
[TD]Criteria 1[/TD]
[TD]127[/TD]
[/TR]
[TR]
[TD]AAA[/TD]
[TD]Criteria 2[/TD]
[TD]121[/TD]
[/TR]
[TR]
[TD]AAB[/TD]
[TD]Criteria 1[/TD]
[TD]48[/TD]
[/TR]
[TR]
[TD]AAB[/TD]
[TD]Criteria 2[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]
Thank you in advance for your assistance!