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 / iF EQUAL STATEMENT FOR...
Power Apps
Unanswered

iF EQUAL STATEMENT FOR CALCULATIONS

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Evening, I have a form that is doing some calculations.

 

DataCardValue1= (DataCardValue28+DataCardValue29)

DataCardValue2= (DataCardVAlue30 + DataCardValue31)

 

These are all user input values.

 

Here is my code for the Default:

 

If( DataCardValue1=SUM(DATACARDVALUE28,DataCardValue29) & DataCardValue2=SUM(DataCardValue30,DataCardValue31), "Error"))

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    These are all user input values.

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    I think you are trying to evaluate if two calculations are true, and if so, you want to display an error message.

    It seems you are calculating the sum of two pairs of DataCardValues and then checking if those sums are equal to the defined values DataCardValue1 and DataCardValue2. If the conditions are true, you want to display the "Error" message. Here's a corrected formula:

    If(
     DataCardValue1 = (DataCardValue28 + DataCardValue29) &&
     DataCardValue2 = (DataCardValue30 + DataCardValue31),
     "Error"
    )
    

    I think you don't need to use the SUM function here since you're only adding two values together, and the + operator should suffice.

    Also, I've replaced the & with && to ensure a proper logical AND comparison.

    See if it helps @Anonymous 

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard