12 Replies Latest reply: Feb 11, 2016 12:39 AM by Avinash R RSS

    Hierarchy and percentage distribution?

    Alejandro Fernandez

      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.