Why sum-if function does'nt work in my form,

Meals_Tracking_2023Revu - Copie.xlsx (23.3 KB)

1. What is the issue? Please be detailed.
sum-if fucntion does'nt work in my form

2. What steps can we take to reproduce this issue?

3. What have you tried to fix the issue?

4. Upload any forms or screenshots you can share publicly below.


I am not sure if the sum-if function is supported. However, you can achieve the desired result using the IF statement.

1 Like

I don't think there's a way to do this with a combination of sum and if. I think you will need to use an expression that will look something like:

sum(${group_stock_out}[commodity_name_2 != 'oil']/quantityout)

${group_stock_out} references the repeat.

The square brackets ([ and ]) contain a filter condition. This is the same as a choice_filter for a select. That condition will be evaluated for each repeat instance of ${group_stock_out}. Notice that commodity_name_2 is not in ${}.

For each repeat instance of ${group_stock_out} that matches the condition in the square brackets, you will get the value for its quantityout. And that is what will be summed.

I haven't tried this yet. If you do try it out, please report back whether it works and if you have any other questions about this approach.

1 Like

Could you try out the solution from LN?