cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kcornell
Frequent Visitor

If Statement

I'm working on an app that would take a "Reading" value and compare it to a minimum value that is pulled from a Sharepoint list. If the reading value is less than or equal to the minimum value, it returns "Pass" and if the reading value exceeds the minimum value it returns "Fail". I'm having difficulty writing the formula in the Pass / Fail field. 

 

Example:

Reading

-1.00

 

Minimum

-0.002

 

Pass / Fail

Pass

2 ACCEPTED SOLUTIONS

Accepted Solutions
KrishnaV
Community Champion
Community Champion

Hi @kcornell ,

 

try this,

If(Value(reading)<=Value(minumum),"Pass","Fail")

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

After trying myself I was able to get the following formula to work for me with the Negative / Positive. 

 

If(Negative/Positive.Text = "Positive",If(Value(Reading.Text)>=Value(Minimum.Text),"Pass","Fail"),If(Value(Reading.Text)<=Value(Minimum.Text),"Pass","Fail"))

View solution in original post

6 REPLIES 6
KrishnaV
Community Champion
Community Champion

Hi @kcornell ,

 

try this,

If(Value(reading)<=Value(minumum),"Pass","Fail")

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
mdevaney
Super User
Super User

@kcornell 

The basic IF statement is written like this...

If(-1.00 <= -0.002, "Pass", "Fail")


If you need help retrieving the value from SharePoint you'll have to share more info about where it is being stored.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@mdevaney , right, but the issue I was having while I was trying setting this up was that it kept looking at the value as text and not as a number. Using Value() prior to the number helped with this issue. I tried changing the text format from TextFormat.Text to TextFormat.Value and was still getting an error. I appreciate the assistance!

@KrishnaV 

Additional question, if I wanted it to look at a text value, Positive or Negative before it applies this formula, how would I write the new formula? This is because the less-than sign would change to greater-than for positive values. 

 

Annotation 2020-07-07 090237.jpg

After trying myself I was able to get the following formula to work for me with the Negative / Positive. 

 

If(Negative/Positive.Text = "Positive",If(Value(Reading.Text)>=Value(Minimum.Text),"Pass","Fail"),If(Value(Reading.Text)<=Value(Minimum.Text),"Pass","Fail"))

KrishnaV
Community Champion
Community Champion

Hi @kcornell ,

 

Sincere apologies for not able to help you on time, I was completely arrested with my work today!

 

I am really happy that you were able to make it.

 

Regards,

Krishna


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (2,377)