Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
alexdataiq
Partner - Creator III
Partner - Creator III

Hierarchy and percentage distribution?

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:

  

EmployeeIDidSchemeiTreeiPercentDistribution
7350613080
7425119020
75226180100
72416151350
75226141350

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
7350673506 13080
752267350675226141340
724167350672416151340
7522675226 180100
7425174251 19020

Or it should be done using Set Analysis? Honestly, I'm at a loss of ideas here.

Any help would be appreciated.

Regards.

12 Replies
PradeepReddy
Specialist II
Specialist II

see the attachment, it might be helpful in generic distribution manner.

PradeepReddy
Specialist II
Specialist II

as part of testing, I have added one more row of data and changed the distribution percentage from equal to generic.

avinashelite


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