web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : zgtR/cA4bEV5WnGM6Smbwh
Power Apps - Building Power Apps
Unanswered

Grand total price calculation in collection

Like (0) ShareShare
ReportReport
Posted on 26 Jun 2024 11:40:26 by

Hi guys,

I  have created a purchase request application where employees will enter purchase info 

the thing is I created a gallery view with collection name colMenu to for emp to enter info 

MarwaAlhajri_1-1719401570568.png

 

each time the click add line patch function will patch data to the collection 

Patch(
    colMenu,
    ThisItem,
    {
        'Description/Model No': TextInput1_1.Text,
        Currency: Dropdown2_1.SelectedText.Value,
        Quantity:Value(TextInput2_1.Text),
        'Total Price': TextInput3_2.Text,
        'Unit Price':Value(TextInput3_3.Text)
    }
);
now the Grand total calculation is based on the column total price 
create a label to view the Grand total with the formula 
"Grand Total:"& Sum(Gallery1_1.AllItems,'Total Price')
but now it will not show all the columns since the last column was not patched 
MarwaAlhajri_2-1719401710156.png

 

  • MarwaAlhajri Profile Picture
    on 01 Jul 2024 at 12:18:16
    Re: Grand total price calculation in collection

    Can someone please help 

  • MarwaAlhajri Profile Picture
    on 26 Jun 2024 at 12:07:07
    Re: Grand total price calculation in collection

    Hi 

    I have already added the total price formula to the text input based on currency selected 

    MarwaAlhajri_0-1719403478983.png

    but what I want is to show the grand total of all rows 

    MarwaAlhajri_1-1719403552902.png

     

    as you can see the grand total only shows the first and second rows because the last row was not patched if I click add row then the grand total with show the third row 

  • mmbr1606 Profile Picture
    13,494 Super User 2025 Season 2 on 26 Jun 2024 at 11:48:15
    Re: Grand total price calculation in collection

    hey @MarwaAlhajri 

     

    can u try this:

    Patch(
     colMenu,
     ThisItem,
     {
     'Description/Model No': TextInput1_1.Text,
     Currency: Dropdown2_1.SelectedText.Value,
     Quantity: Value(TextInput2_1.Text),
     'Unit Price': Value(TextInput3_3.Text),
     'Total Price': Value(TextInput2_1.Text) * Value(TextInput3_3.Text)
     }
    );
    

     

    and this in label:

    "Grand Total: " & Sum(Gallery1_1.AllItems, 'Total Price')
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete