Problems suming columns in new column

Hi i want to sum the values of three columns.

but i do not know how - {{_.sum(currentSourceRow.COMISION_FINAL1,currentSourceRow.COMISION_FINAL2,currentSourceRow.COMISION_FINAL3)}}

Hey @Elisa_Reynal Can you try

{{currentSourceRow.COMISION_FINAL1 + currentSourceRow.COMISION_FINAL2 + currentSourceRow.COMISION_FINAL3}}

Hope this helps

image
it gives null :frowning:

can you try with

{{(currentSourceRow.COMISION_FINAL1 || 0) + (currentSourceRow.COMISION_FINAL2 || 0) + (currentSourceRow.COMISION_FINAL3 || 0)}}

Also make sure those columns are formated as numbers.

1 Like

Hello!

To add on here, make sure that the argument for the lodash sum function is formatted as an array Lodash Documentation

{{_.sum([currentSourceRow.COMISION_FINAL1,currentSourceRow.COMISION_FINAL2,currentSourceRow.COMISION_FINAL3])}}

2 Likes