34
Views
5
Solved
###### Convert Negative Value to Positive
Question
Application Type

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.

Solution

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

Hi Esrom,

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

Solution

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.