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
Solved! Go to Solution.
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:
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.
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:
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.
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 🙂
It's so funny. Cheer up.
You can also wrap those numbers in max() min() and then calculate the difference:
sub(max(x,y),min(x,y))
Yet another workaround required for what should be a standard function. How are people still using power apps.. It takes about 3 times as long to create something far less robust and more flaky than traditional software development. There's no unit testing of anything, no adequate debugging, no source control - if someone updates a flow no-one knows what was changed. I can't believe how shoddy it is honestly. Maybe if people aren't from a software development background they are none the wiser and think this is great... I can assure you it definitely is not.
User | Count |
---|---|
88 | |
39 | |
23 | |
20 | |
16 |
User | Count |
---|---|
128 | |
47 | |
46 | |
27 | |
25 |