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 / Check price Variation
Power Apps
Answered

Check price Variation

(0) ShareShare
ReportReport
Posted on by 521

Hi,

I need assistance experts, I'm building a shopping cart app almost done now, at moment stuck on one thing which is to check if the product price edited wanted to know on a label called variation for example like if the product amount is 100 if edited to 90 then it will show on the label Variation 10 saved and so on any row edited should add the count. 
Thanks 

Categories:
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @PowerApps11,

     

    If you have both the old price and new price stored in a collection, data source or in a gallery and want to display the total amount saved outside the gallery, use the following code in the Text property of a label:

    Sum(
     ForAll(
     Filter(
     //Change to collection or galleryname.AllItems if necessary
     TableName,
     PriceOriginalColumn > PriceNewColumn
     ) As Main,
     Main.PriceOriginalColumn - Main.PriceNewColumn
     ),
     Value
    )

     

    If you display the shopping cart within a gallery and also want to show the value saved for each item, you could display a label for each row in the gallery and then use a label outside the gallery to calculate the sum:

    //Text property of the label inside the gallery (let's name it lblValueSaved)
    ThisItem.PriceOriginal - ThisItem.PriceNew
    
    //Text property of the label outside of the gallery
    Sum(GalleryName.AllItems, Value(lblValueSaved.Text))

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • PowerApps11 Profile Picture
    521 on at

    @LaurensM  Thank you 

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard