Convert Negative Value to Positive
Application Type
Traditional Web, Reactive

Hello All,

Is there another way to convert negative value to positive and vice versa?

Currently, what I did is like this.

If(Value <= 0, TextToDecimal(Replace(DecimalToText(Value),"-","")), -Value)

I don't want to use JS though.

Thanks in advance.



Hi Esrom,

Use can use abs() to convert negative to positive as Nuno said.

If you want to convert negative to positive and positive to negative I think you can use assign widget and set Value = -Value. Please take a look at this one as sample.

Best,

Khuong

mvp_badge
MVP

Hi Esrom,

You can use the built-in function abs(). Check here.

Hi Esrom,

Use can use abs() to convert negative to positive as Nuno said.

If you want to convert negative to positive and positive to negative I think you can use assign widget and set Value = -Value. Please take a look at this one as sample.

Best,

Khuong

Thanks all for your answers! Always grateful for this community.

It works with converting negative value to positive, but Nuno's and Kuongs solutions is better. Thanks!

Hello Esrom,


Why don't you just multiply the value by -1 ?

[your_number] * -1 

For example:

-5 * -1 = 5

5 * -1 = -5

-1.234 * -1 = 1.234

1.234 * -1 = -1.234


Best regards,

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.