cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

Absolute numbers?

Hello,

How do I get the absolute value of a number?

Example:

sub(10,11)

Which equals -1. I need to get the absolute value of 1 from this statement. 
How can this be accomplished?
Thank you 

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @ericonline,

 

Unfortunately, there is no ABS function exist in Power Automate, as a workaround, you can determine it is whether less than 0, if it is, convert it to a string, then remove the "-" character, then convert it into an integer, for example:Annotation 2019-12-10 131824.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-litu-msft
Community Support
Community Support

Hi @ericonline,

 

Unfortunately, there is no ABS function exist in Power Automate, as a workaround, you can determine it is whether less than 0, if it is, convert it to a string, then remove the "-" character, then convert it into an integer, for example:Annotation 2019-12-10 131824.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ericonline
Community Champion
Community Champion

Just searched the forum for this topic (2021-01-12T16:23)... forgot I even asked it.

 

You know what the old timers say... "I've forgotten more than you'll ever learn about PowerPlatform". 

 

Iiiitts happeniiiing 🙂

v-litu-msft
Community Support
Community Support

It's so funny. Cheer up.

raf-avag_99
Advocate II
Advocate II

You can also wrap those numbers in max() min() and then calculate the difference:

sub(max(x,y),min(x,y))

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,358)