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 / Text() not working on ...
Power Apps
Answered

Text() not working on the false condition of If()

(0) ShareShare
ReportReport
Posted on by 6
Hi Community,
 
I have the following formula where I change the formatting of a gallery text input (default property) according to a context variable (which is connected to a button to edit/cancel etc.). The gallery is connected to a Sharepoint list where Revenue column is currency.
 
If(editGallery, Value(ThisItem.Revenue), Text(ThisItem.Revenue, "0,000 €"))
  • The text input shows nothing when editGallery is false
  • It shows correctly when editGallery is true
  • It shows both true and false values correctly when I swap their places.
  • It shows Text(ThisItem.Revenue, "0,000 €") correctly when I remove the if and use only that section
  • The false condition starts working correctly if I change true part of the If() to:
    Text(ThisItem.Revenue, "0")
  • Interestingly, everything works correctly when I use the following formula -basically reversing the If()-
    If(!editGallery, Text(ThisItem.Revenue, "0,000 €"), Value(ThisItem.Revenue))    
Any ideas as to why the initial formula does not work?
Categories:
  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    hey
     
     
    can u try this:
    If(editGallery, Text(Value(ThisItem.Revenue), "0"), Text(ThisItem.Revenue, "0,000 €"))
    
    if it helped please mark my answer as verified,
     
     
    cheers
  • Yorgooo Profile Picture
    6 on at
     
    It is more or less similar to the 5th bullet point and yes it works when I use that.
  • Suggested answer
    ronaldwalcott Profile Picture
    3,914 Moderator on at
    When using IF for an evaluative property the true and false parts have to be the same type or it can fail or behave unexpectedly. This is the unexpected behaviour probably occurring this way because of how the program was created to evaluate the IF statement. Even if it works when evaluating the negative condition, the correct approach is to use the Text function for both the positive and negative result.
  • Suggested answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    @yorgooo
     
    Yes but thats the only way to solve this cause u need both comparrisons of the Same Type 

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard