11-27-2022 11:30 PM
Hello Community,
I need to get the sum of value present in between special character ‘|’. Length of input may vary, one such scenario is attached. Please suggest.
Output getting after aggregate : “NEUTSUM”: “261.02||697.13|359.22”
I need to get sum of those values.
Solved! Go to Solution.
11-27-2022 11:59 PM
Hi @nirupama ,
You can try the following expression:
$NEUTSUM.split('|').filter(x => x != "").reduce((accum, currentValue) => accum + currentValue, 0)
Let me know if this helps you.
BR,
Marjan
11-27-2022 11:59 PM
Hi @nirupama ,
You can try the following expression:
$NEUTSUM.split('|').filter(x => x != "").reduce((accum, currentValue) => accum + currentValue, 0)
Let me know if this helps you.
BR,
Marjan
11-28-2022 12:34 AM
@marjan.karafiloski That helped me, Thank you!!