A problem with minus sign

I am trying to invert a number using the * -1. However, once I use this, the results disappear. I found the same description for the problem here:

However, this time tried the mentioned solution by creating a calculated field with -1 but the results are the same when I create the calculated column like this
{total} * {minus_one_col}

I am not sure, why this behaviour which I have never seen in any BI tool.

Hi,

Please check you data type must be integer in this case.

It simple as I show you.

Regards,
Naveed Ali

Hi @Naveed, thanks for answering. I am actually working on some type of decimal numbers
For example

‘365.158’ stored as a string
I split it using substring to be like this and parseDecimal to be finally like this:
(36 - 5.158) * -1
It does not work and changing it to 1.0 gives the same results.

1 Like

Hi @Rainhard ,

Are you still facing the issue ? I tested the following at my end and the calculation is correct :

sub1 : parseDecimal(substring({string_value},1,2))
sub2 : parseDecimal(substring({string_value},3,10))

calculation: (sub1-sub2)*-1

Hi @Rainhard, we hope Koushik’s solution worked for you. Let us know if this is resolved. And if it is, please help the community by marking his answer as a “Solution.”