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!