cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tuonoman
Helper IV
Helper IV

calculate in detail form

Good morning to all,

 

I use an Excel workbook to manage a stock. In this workbook I have a table with 5 columns.
Movement_ID/Product_ID/Date/OUT/IN.


In my power apps page with the details of my products I would like to display the quantity of parts in stock.


Does Power apps have the possibility via the "Movement" table to make a subtraction according to an ID from the IN and OUT? quantities and to display it in my part's detail form?


Thank you for your help

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Super User II
Super User II

Hi @tuonoman ,

The formula you looking for is:

With({movementSelectedProduct:Filter(Movement,ID=selectedID)},
     Sum(movementSelectedProduct,IN)-
     Sum(movementSelectedProduct,OUT)
)

What you need to do is to establish the way you want to select the Product_ID (and set the selectedID value from the filter).

 

Hope it helps !

    

View solution in original post

2 REPLIES 2
gabibalaban
Super User II
Super User II

Hi @tuonoman ,

The formula you looking for is:

With({movementSelectedProduct:Filter(Movement,ID=selectedID)},
     Sum(movementSelectedProduct,IN)-
     Sum(movementSelectedProduct,OUT)
)

What you need to do is to establish the way you want to select the Product_ID (and set the selectedID value from the filter).

 

Hope it helps !

    

View solution in original post

tuonoman
Helper IV
Helper IV

Hi @gabibalaban 

Thanks for your help.

I have modified your proposition.

That works perfectly !

 

I like Powerapps more and more

With({_movementSelectedProduct:Filter(MOUVEMENT;ID_PRODUCT=LISTEPRODUCT.Selected.ID_PRODUCT)};
     Sum(_movementSelectedProduct;IN)-
     Sum(_movementSelectedProduct;OUT)
)

 

 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (18,792)