Hello Community.
I’ve been trying to find out whats going on at a calculation field which should sum values of defined Status in a related app.
Here are the values filtered:
But the calculation is not bringing the same value as the sum:

Here is the code I am using (pretty basic, but I tried to treat the numbers formating also, and couldnt reproduce the actual sum for this case):
var val = @All of Total Budget Amount R$ (Main);
var tip = @All of Status;
var total = 0;
for(var i = 0; i < val.length; i++)
{if((tip[i] == "Billed" || tip[i] == "Approved")){total += val[i];}}
total
There is one specific record that is missing to the sum, which is the higher value (more then 1M), but why does it sum by the bottom correctly, but not on calculation?
