web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Compose subtract from ...
Power Automate
Unanswered

Compose subtract from a variable

(0) ShareShare
ReportReport
Posted on by

Hello,

I am currently building a flow, where I need to help myself with some "flags" and I like to use numbers to see the status.

 

Now when I am doing the "month countdown" my flow runs each week and if the value is still not 0 it should continue to substract until the value is 0 each week.

 

So, I am trying to achieve this by having Initializing Variable which is equal to some value from SharePoint, let's say 4. And then I need to write a formula that would do something like sub(@{variables('HelpVariable1')},1), but I am not really sure if I am getting the syntax right. I did not fully understand it yet and any guide, how to write formulas would be really useful.

 

Thanks in advance.

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @Anonymous,

     

    There is no sub() function in Flow, but you could use add() function to achieve it.

    So, it could be add(variables('HelpVariable1'),-1)

    Annotation 2020-05-05 135610.png

     

    But it seems like you want to value it back to variable HelpVariable1, so maybe you could have a try that using Decrement variable action, put the 1 into it, it will sub 1 to itself:

    Annotation 2020-05-05 135631.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.

  • Community Power Platform Member Profile Picture
    on at

    Hello @v-litu-msft ,

    thanks for your reply.

     

    I will definitely give it a shot, but according to this post and many others sub() expression should be in flow, even the expression builder offers it in it's "intellisense".

    https://powerusers.microsoft.com/t5/General-Power-Automate/How-do-I-substract-two-values-from-sharepoint-column/m-p/88728#M12894

     

    I will let you know with results 🙂 Thanks.

  • v-litu-msft Profile Picture
    on at

    Hi @Anonymous,

     

    Sorry, no sub() function is a flash in my head, as a matter of fact, there is.

     

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard