Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3189

Re: Script Logic - Divide by zero

$
0
0

Hi Lara,

 

Yes, with script logic the division by zero in some record (or with missing record) produce zero!

But why you want to have "despite the value of the account I'm using in the sum"? Division by zero produce infinite value

 

You have to use conditional operator - ternary operator in REC:

 

*REC(EXPRESSION=(%VALUE%==0) ? VALUEIFZERO : 1/%VALUE%,ACCOUNT=PESO_PRODUCAO_DIST_M)

 

Please explain the logic you want to achieve!

 

Vadim


Viewing all articles
Browse latest Browse all 3189

Trending Articles