Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Format Floating Point Number as Currency

(0) ShareShare
ReportReport
Posted on by 1,142

Thank you for taking the time to read my question.

I really don't know why this is not working, any help is greatly appreciated.

 

Text(Parent.Default,"[$-en-US] ###,##0.00") gives me 1.00

 

Text(Parent.Default,"###,##0.00","$-en-US") is incorrect

 

Text(Parent.Default,"$###,##0.00","en-US") gives me nothing

 

Text(Parent.Default,"$###,##0.00") gives me the Pound symbol instead of the dollar sign.

 

thoughts?

Thanks!

Categories:
  • TheRobRush Profile Picture
    TheRobRush 11,121 on at
    Re: Format Floating Point Number as Currency

    I changed my text input to number only and altered my two label formulas to work with a number only textbox instead, both worked, here is code I placed in the labels.

     

     

    Text(RoundUp(TextInput3,2),"$###,##0.00","en-US")

    or

    Concatenate("$",Text(RoundUp(TextInput3,2),"###,##0.00","en-US"))

     

    you could then put  a label next to the text input with a value of "$" and have its visibility set to

     

    IsBlank(TextInput3)=false

     

    which will make a dollar sign show up next to your number input area when they have typed in it.

  • Verified answer
    iwonder Profile Picture
    iwonder 1,142 on at
    Re: Format Floating Point Number as Currency

    Hi @TheRobRush 

     

    ...ok... I feel ashamed....

     

    Text(Parent.Default,"$###,##0.00","en-US") works. I had my Text Input format = Number instead of Text.

     

    I did that so that users could not enter text into this field...

     

    So a bit of a conundrum.... do I not show the currency symbol and risk users entering text or change the Text Input format to Number and not show the currency symbol.

     

    It's a shame we have to choose.

     

    Thanks very much for your help!

     

     

  • TheRobRush Profile Picture
    TheRobRush 11,121 on at
    Re: Format Floating Point Number as Currency

    thats odd, worked for me, but you could always try leaving the $ out and try it like

    Concatenate("$",Text(Round(Value(Parent.Default),2),"###,##0.00","en-US"))
  • iwonder Profile Picture
    iwonder 1,142 on at
    Re: Format Floating Point Number as Currency

    Hi @TheRobRush 

    Thank you very much for your reply.

     

    I have: Text(Round(Value(Parent.Default),2),"$###,##0.00","en-US") now and my TextInput in my data card is blank

     

    If I take out the "$" then I get my value back (the cost for this test record is 0.00).

     

    IsNumeric(Parent.Default) returns true

     

    Dollar.png

     

     

  • TheRobRush Profile Picture
    TheRobRush 11,121 on at
    Re: Format Floating Point Number as Currency

    I have it working on my end using the following

     

    Text(RoundUp(Value(TextInput3.Text),2),"$###,##0.00","en-US")

     

    Added in the roundup(value( to be sure whatever it is converting is being seen by it as a number.

     

    Hope that helps, hard for me to give an exact solution without seeing the source in your parent.default

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard