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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Compose subtract from a variable

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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
    Microsoft Employee 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
    Microsoft Employee 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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 671

#3
Haque Profile Picture

Haque 551

Last 30 days Overall leaderboard