how to calculate the sum of multiple fields for conditionals?