How to calculate % share?

sharmagh
Contributor

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!

1 ACCEPTED SOLUTION

Accepted Solutions
rob_marshall
Moderator

Re: How to calculate % share?

@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

View solution in original post

5 REPLIES 5
rob_marshall
Moderator

Re: How to calculate % share?

@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

View solution in original post

sharmagh
Contributor

Re: How to calculate % share?

@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?

Misbah
Moderator

Re: How to calculate % share?

@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

sharmagh
Contributor

Re: How to calculate % share?

@Misbah Got it Thanks!
Kanishq17
Community Boss

Re: How to calculate % share?

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