Common Data Service, Flow, power automate

Power Automate: sum(field1, field2, field3, field4) is greater than 0.Easy?

The requirement is to summarize 4 number field values to determine if the total is greater than 0. What could possibly go wrong?

You think it should be somewhere in the Expression under Math functions. Think again.

The add only allows to summarise 2(!?) numbers. Not 3, not 4. It let me to add extra fields and passed the validation then it failed on a run.

The solution is to use Increment Variable 3 times. We Initialize variable with one of the fields then add another 3 fields in the sequential Increment variable actions.

Easy!

Actually, for this specific case when the actual sum is not important and the only thing we care about is the total is greater than 0 it’s enough to determine that at least one of the field values is greater than 0.

Instead of this:

we will have this:

1 thought on “Power Automate: sum(field1, field2, field3, field4) is greater than 0.Easy?”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s