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 II
Super User II

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 II
Super User II

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.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,047)