Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to know if this is possible to be done with QV. Let's hope I make myself clear.
Asume I have the following records:
EmployeeID | idScheme | iTree | iPercentDistribution |
73506 | 13 | 0 | 80 |
74251 | 19 | 0 | 20 |
75226 | 18 | 0 | 100 |
72416 | 15 | 13 | 50 |
75226 | 14 | 13 | 50 |
The iTree column is a reference to its parent located in column idScheme. Each record has a percentage (iPercentDistribution). As you can see the 4th and 5th records (idScheme = 15 & 14) have as parent the 1st row (IdScheme = 13). Records one throug three (IdScheme = 13, 19, 18) have no parents.
The last two records have a distribution percentage of 50% each, but since it's parent only has 80% their percentage must be 40% each. It's there a way to get the following result using Hierarchy?:
EmployeeID | EmployeeID1 | EmployeeID2 | idScheme | iTree | iPercentDistribution |
73506 | 73506 | 13 | 0 | 80 | |
75226 | 73506 | 75226 | 14 | 13 | 40 |
72416 | 73506 | 72416 | 15 | 13 | 40 |
75226 | 75226 | 18 | 0 | 100 | |
74251 | 74251 | 19 | 0 | 20 |
Or it should be done using Set Analysis? Honestly, I'm at a loss of ideas here.
Any help would be appreciated.
Regards.
see the attachment, it might be helpful in generic distribution manner.
as part of testing, I have added one more row of data and changed the distribution percentage from equal to generic.
please provide the same data and the distribution for more than 2 children case ...which will help us to build a logic for the same