I am trying to figure out a way (I seem to be stuck in a rut this morning) to find the Count of different BeneficiaryID in a table, and divide 2 fields by that number.
Let me explain further.
Here's a typical row of data:
Any ideas are welcome! Thanks
So the records are repeating because these people are both to be paid out the [UnitsRemaining] in the event of the [EmployeeID]'s death, because they have been chosen by the Employee to receive these [Units].
To pay out these Beneficiaries, I am going to need to divide the AwardUnits and UnitsRemaining by the number of different BeneficiaryIDs.
In the scenario I gave, it would be
Note: I need to differentiate by [EmplyoeeID] also. By that I mean, there may be more than just these people with records, so I need to only divide by the "Count" of BeneficiaryIDs where the EmployeeID is the same and the BeneficiaryID are different.
I only need to pay Beneficiaries for whom they are the beneficiary of (EmployeeID).
Also, there may be more than 2 beneficiaries, and there may be less than 2. I just used 2 as an example. So there may also be
Let me explain further.
Here's a typical row of data:
Code:
BeneficiaryID Name EmployeeID AwardUnits Units Remaining 135 Mark 100200 5.3333 1 135 Mark 100200 3.0000 2 136 John 100200 5.3333 1 136 John 100200 3.0000 2
So the records are repeating because these people are both to be paid out the [UnitsRemaining] in the event of the [EmployeeID]'s death, because they have been chosen by the Employee to receive these [Units].
To pay out these Beneficiaries, I am going to need to divide the AwardUnits and UnitsRemaining by the number of different BeneficiaryIDs.
In the scenario I gave, it would be
Code:
BeneficiaryID Name EmployeeID AwardUnits Units Remaining 135 Mark 100200 5.3333/2 1/2 135 Mark 100200 3.0000/2 2/2 136 John 100200 5.3333/2 1/2 136 John 100200 3.0000/2 2/2
I only need to pay Beneficiaries for whom they are the beneficiary of (EmployeeID).
Also, there may be more than 2 beneficiaries, and there may be less than 2. I just used 2 as an example. So there may also be
Code:
BeneficiaryID Name EmployeeID AwardUnits Units Remaining 137 Dan 100200 5.3333/3 1/3
Comment