cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sumaira
Post Prodigy
Post Prodigy

Subtract in power automate

Hello Experts,

When an item is created in sharepoint,it will have a number field say leave and I'll get items from another list named list2 which has total leaves details, i want to subtract the total leaves from get items - leaves from list1, how do i achieve this requirement?

I actually tried using the sub function, but it is entering into apply to each

Please guide

Best regards!

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Sumaira,

 

Yes, with the sub() function this should work:

sub(1000, 950)
sub(variables('B'), variables('A'))

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#s...

 

Keep in mind that both values need to be integer or float.

 

Hope this helps a bit.

 

If you need any help with that apply to each just let us know.

 

View solution in original post

1 REPLY 1
Expiscornovus
Super User
Super User

Hi @Sumaira,

 

Yes, with the sub() function this should work:

sub(1000, 950)
sub(variables('B'), variables('A'))

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#s...

 

Keep in mind that both values need to be integer or float.

 

Hope this helps a bit.

 

If you need any help with that apply to each just let us know.

 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,554)