Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

if else doesnt work

(2) ShareShare
ReportReport
Posted on by 6
Hello
I tried to enter a formula but it doesn't work. I don't get the error either, just a red border on the right. 
I can't save. 
The code is 
If(T1 > 0, 200, 2000)
T1 is a number field.
What am I doing wrong?
  • timl Profile Picture
    34,955 Super User 2025 Season 1 on at
    if else doesnt work
    In addition to what Warren says about checking the record references, another thing to check is your language. 
     
    If you're using Power Apps using a Latin/non-English language, you'll need to substitute the commas with semi-colons.
     
    If(
       ThisItem.T1 > 0; 
       200; 
       2000
    )
     
    If that doesn't help, I'd suggest that you post a screenshot of your error.
  • Ravindra Jadhav Profile Picture
    263 Super User 2025 Season 1 on at
    if else doesnt work
    I Am Assuming T1 is Variables And Having Value In that
    If(
       Value(T1) > 0, 
       200, 
       2000
    )
     
  • WarrenBelz Profile Picture
    146,670 Most Valuable Professional on at
    if else doesnt work
    If you are referring to the field from another control in a Form or Gallery you would need
    If(
       ThisItem.T1 > 0, 
       200, 
       2000
    )
    If T1 is a Text control or Label you would need
    If(
       Value(T1.Text) > 0,
       200,
       2000
    )
    So where exactly are you using this formula?
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard