Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

PowerApps Summing on If Else Depending on a Choice Field

Hi all,


I am currently trying to Sum transactions where they are positive on a Sell and Negative on a Buy.

My 'transaction type' choice field is a Buy/Sell choice.

My SD date projects out how many days away the transactions are.


For this first column in my Clearcollect I have tried using an IF statement depending on whether my transaction is a Buy/Sell.


If the transaction is a Sell I am trying to Sum that trade amount positively, if its a Buy I am trying to Sum that trade amount as a negative number in order to show the net difference, hence the Else is 'trade amount' * -1 


Currently I have tried using below below for the condition of the If statement - but none work:

[@'transaction type'].Value = "Sell"

'transaction type'. Value = "Sell"

'transaction type'= "Sell"

'transaction type'= 'transaction type'. Sell


Below is the current state of my code and the output on my App








Many thanks,


Resident Rockstar
Resident Rockstar

Hi @cnr ,


You can try below code if it works ? 


'transaction type'.Value = "Buy"

'transaction type'.Value = "Sell"




Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,263)