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 Apps / Summarize Stock/Invent...
Power Apps
Unanswered

Summarize Stock/Inventory movement

(0) ShareShare
ReportReport
Posted on by 240

Hello,

 

i do have two Dataverse Tables,

Nr. 1 "Stock List" and Nr. 2 "Stock Movement"

 

in My Powerapp i have a Starting Page, showing all Items in a Gallery.

I want to filter this Gallery, to remove items with 0 Stock.

To achieve this, i switched from directly calculating the Stock in a Label via Summary of Stock Movement items per Gallery Item(which worked without any problem) to a Collection - as i was not able to filter for Label.Value(Text)

 

What i want is a collection, generated from Stock_List, adding the Stock Column, then moving trough stock Movement list, and summarizing all movements, write the result into collection as Stock.

 

i played around for 2 hours now without any working solution.. 
this is my latest code, showing no error, but is not working 😄

can someone help me out?

 

ClearCollect(

 col_stock;

 AddColumns(

 Stock_List;

 "Stock";

 ""

 )

);;

ForAll(

 col_stock; 

 {

 Stock: Sum(

 Filter(

 Stock_movement;

 Stock_movement [@MatNumber] = col_stock [@MatNumber]

 );

 Amount

 )

 }

)



 

Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    Since you are using Dataverse, consider building a View that automatically filters out stock items of quantity zero. You can configure a View on this screen:

    BCLS776_0-1705414954253.png

    Once you started a new View, edit the filters on the view here:

    BCLS776_1-1705415021597.png

    Filters can include criteria on fields from related records too.

     

    Back in your app, refresh the datasource and then revise your Filter() to use the new View as its second argument.

     

    Hope that helps,

    Bryan

     

     

  • TSte Profile Picture
    240 on at

    Hey, and thanks for your reply.

     

    Unfortunately the source of my Collection and the summary of Items/Stock are in two different dataverse Tables.

    I have also tried to generate the Sum directly in Dataverse columns, with a RollUp/Calculation to the Inventory Movement database, but im not able to get the Link.

     

    thanks

    Thomas

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard