# Calculating a % of a subset

I have the total active customers by product. I have products organized into schools. I can calculate the percent each product represents of the total of all products regardless of school. I do this in a module with two line items, Active and Active %. The formula is Active / Active[SELECT:’Programs P2’.All Programs]. I would like to calculate the percent each product represents of the total of products in the school. I do not understand how to calculate the divisor, the sum of the products in only one school. The products are in a list called Programs P2. The Schools are in a list called Schools. Programs P2 has a list-formatted property called School.

Tagged:

Hi Dan,

If I am understanding your requirement correctly, it sounds like you've laid all the foundations you need to do this and it is just a case of getting the calculation to reference the right things.

You said that you have created the a list formatted property on the Programs P2 list called School. You can reference this in the formula to get it to look up the relevant parent (or school) value for each product. The formula in the new line item (e.g. School Active %) should read: Active / Active[LOOKUP: 'Programs P2'.School]

I hope this makes sense. If you need more information, let me know.

Steve