Trying to understand why code toString(abs(round(netamount,2))), "|", is generating additional zeros

Trying to understand why code toString(abs(round(netamount,2))), “|”, is generating

Hello @RAHUL_singh1

That’s pretty interesting, I’ve never run into this myself but I’ve seen issues with decimal places come up before.

The first thing I would try is checking the data type of netamount. If its currently decimal float you could try changing it to decimal fixed.

Also, a user a while ago found a workaround for a similar issue. You could try adding the logic from the calculation in the solution from this topic into your calc above:

Hi @duncan , Thanks for your response . I tried with decimal(float) and decimal(fixed) both. Also in my Athena dataset I tried to cast(netamount as decimal(18,2)) but still same output.

Hey @RAHUL_singh1

If updating the data type didn’t work then I would try the calculation from the solution in the linked topic from my comment above.

Hey @RAHUL_singh1

Were you able to try the calculation in the topic I linked above?