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 / PowerApps Summing on I...
Power Apps
Unanswered

PowerApps Summing on If Else Depending on a Choice Field

(0) ShareShare
ReportReport
Posted on by 144

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

 

cnr_1-1632825103960.png

 

cnr_0-1632825013863.png

 

 

 

Many thanks,

Conor

Categories:
I have the same question (0)
  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @cnr ,

     

    You can try below code if it works ? 

     

    'transaction type'.Value = "Buy"
    or 
    
    '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.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard