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