cancel
Showing results for
Did you mean:
Frequent Visitor

## Sum() of fields in Table limited?

The following Sum() function works fine:

``````Sum(
Filter(varBigTable;
Year=varReviewYear;
Quarter=varReviewQuarter;
KPAname=ThisItem.Result
); (KPIselfscore/5)
);``````

However, I need to divide the answer of "Sum(KPIselfscore/5)" with sum of the KPIweight's like this:

``````Sum(
Filter(varBigTable;
Year=varReviewYear;
Quarter=varReviewQuarter;
KPAname=ThisItem.Result
); (KPIselfscore/5)/(KPIweight)
);``````

...but this does not work. It does not throw an error. It just ignores the "/(KPIweight)" part. I tried a few variants such as:

• (KPIselfscore/5)/(KPIweight)
• (KPIselfscore/5/KPIweight)
• (KPIselfscore/5)/KPIweight

Always gives the same result, i.e. only calculating (KPIselfscore/5) and ignores the rest of the formula. I am trying to avoid using two Sum() functions to achieve this.

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

Hi @SytzeVisser ,

What is KPI weight (is it a field in the table?) - if so

``````Sum(
Filter(
varBigTable;
Year=varReviewYear;
Quarter=varReviewQuarter;
KPAname=ThisItem.Result
);
"KPI";
KPIselfscore/KPIweight
);
KPI
)/5``````

If it is a fixed variable, try this

``````(
Sum(
Filter(
varBigTable;
Year=varReviewYear;
Quarter=varReviewQuarter;
KPAname=ThisItem.Result
);KPIselfscore
)/5
)/KPIweight``````

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

2 REPLIES 2
Super User

Hi @SytzeVisser ,

What is KPI weight (is it a field in the table?) - if so

``````Sum(
Filter(
varBigTable;
Year=varReviewYear;
Quarter=varReviewQuarter;
KPAname=ThisItem.Result
);
"KPI";
KPIselfscore/KPIweight
);
KPI
)/5``````

If it is a fixed variable, try this

``````(
Sum(
Filter(
varBigTable;
Year=varReviewYear;
Quarter=varReviewQuarter;
KPAname=ThisItem.Result
);KPIselfscore
)/5
)/KPIweight``````

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Frequent Visitor

It's a field in a table. It looks so obvious when you see the solution.

Great solution. Many thanks!

Announcements

#### Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Our team will be reviewing posts using the new "Copilot" label to ensure we highlight and amplify the most relevant and recent content, so you're assured of high-quality content every time you visit. If you share a post that gets featured in the curated gallery, you'll get a PM in the Community to let you know!The curated gallery is ready for you to experience now, so visit the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community. We can't wait to see what you "cook" up!