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 / Determining numbers sign
Power Apps
Answered

Determining numbers sign

(0) ShareShare
ReportReport
Posted on by 11

Hello dears,

 

I'm working on acanvas app and at a certain point I need to determine if 3 value has the same sign (positive or negative) or not.

I'm using 3 text boxes for the numbers and a label to get the result.

 

I used the below formula in the label Text property but it's not working, any ideas?

If(And(Value(txt1.Text) > 0, Value(txt2.Text) > 0,Value(txt3.Text) > 0),"Same sign",
If(And(Value(txt1.Text) < 0, Value(txt2.Text) < 0,Value(txt3.Text) < 0),"same sign","Not same"),"not same")

Thanks in advance.

 

 

Categories:
I have the same question (0)
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Since your numbers are in text boxes, do the negative numbers look like this?   .12345

  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    @Albeik 

    The following should work for you.

    With({pos1:Value(txt1.Text) >= 0,
     pos2:Value(txt2.Text) >= 0,
     pos3:Value(txt3.Text) >= 0
     },
    If((pos1=true && pos2=true && pos3=true) || (pos1=false && pos2=false && pos3=false),
     "Same sign",
     "Different sign" 	 
     )
    )

     The issue with your original formula is that the nested if returns the string "same sign" or "not same", which is not an acceptable boolean value that can be processed by the parent if statement.

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