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 Apps / Calculate total of val...
Power Apps
Answered

Calculate total of values that contain a specific value

(0) ShareShare
ReportReport
Posted on by 242

I have two SharePoint lists: AssetOrder and Inventory with an Powerapp.

Inventory has 4 columns: Category, article, inUse (Laptops, HP Elitebook, yes).

 

I have 3 laptops in total.

Two of them are in use (inUse: yes).

So one of them is available (InUse: no)

 

In the AssetOrderlist i would like add a Column named Available and show that one laptop is available in the category inUse in Inventory. Is this possible and how?

 

 

Categories:
I have the same question (0)
  • notj Profile Picture
    782 on at

    @Mirtemir This covers what you're looking for: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-counts

  • rsaikrishna Profile Picture
    3,703 Microsoft Employee on at

    @Mirtemir 

     

    What is the difference between InUse (Yes/No) and Available? If InUse is No, does it means Available?

     

    You can always add columns to SP list and adjust your Power App.

     

    Regards

    Krishna Rachakonda

    If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @Mirtemir ,

    From my understanding, you want that every time you update InUse column values of one or more records from Inventory list, the Available column from AssestOrder of the same product category to be updated with the sum of in use article of the same category.

    Well, depends on how you choose to update values in Inventory list.

    There are 2 options, as least I could think of now :

    1. You choose to create a Sharepoint - PowerApps form:

        In this scenario you need to update OnSuccess property of the Form to something like (of course you need to adapt the bold  to your app):

        Patch ( AssetOrder,

                  Coalesce(

                             LookUp(AssetOrder,category = CurrentModifiedCategory

                             Defaults(AssestOrder)

                               ),

                   {available:CountRows(Filter(Inventory,category=CurrentModifiedCategory && !inUse))}

                  )

    2. You choose to use the native Sharepoint form or the quick edit:

        In this scenario you need to construct a PowerAutomate Flow triggered by "SharePoint - When a record is created/modified"

       If you are interested in this option it time for you to discover POWERAUTOMATE as well, which in by the way a very very powerfull tool.                          

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard