How to calculate % share?

Hi,

 

I have a Module with List of Persons who made contributions as a row dimension along with their respective Contribution in a separate Line Item, now I want to calculate how much percentage share of each person in my second line item.

 

Kindly assist.

 

Thanks!

Best Answer

  • rob_marshall
    Answer ✓

    @sharmagh ,

     

    Does the list of people who contributed have a top level?  If not, add one.  The percentage line item formula would be: Contribution (line item) / Contribution[Select: Employee.All Employees] where All Employees is the top member.

     

    Hope this helps,

     

    Rob

Answers

  • @rob_marshall 

     

    Hi just for my understanding what if i am using a flat list can i have something like Sum to get to my desired result?

  • @sharmagh 

     

    That's the best and the easiest way of rolling up numbers as @rob_marshall suggested. There is another way but that will break most of the elements of PLANS where you will be using LOOKUPs. So let's not go there. 

     

    To answer your question - SUM can't be used in such scenarios

  • @Misbah Got it Thanks!
  • Hi,

     

    Assuming your list of employees has a top level,

     

    create a 3rd line item without employee dimension and refer it to 1st line item so it has value of top level item 

    then 2nd line item will be 1st(contribution of each)/3rd(top level contribution same for all employee list members as it is without that dimension)

     

    PFA a screenshot

    Kanishq17_0-1588963791312.png

    Hope it helps