web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Format decimal numbers
Power Apps
Unanswered

Format decimal numbers

(0) ShareShare
ReportReport
Posted on by 51

How do i format decimal numbers in PowerApps? I saw how dates can be formatted...but nothing about formatting decimal numbers. Thanks.

Categories:
I have the same question (0)
  • Verified answer
    Brian Dang Profile Picture
    3,976 on at

    https://powerapps.microsoft.com/en-us/tutorials/function-text/

     

    If you scroll down 3/4 of the page, it has a section on decimals with examples--the output will be text though.

     

    Text(5.678,"#.#") becomes 5.7

    If you want to maintain 0, use Text(num,"0.0")

  • Community Power Platform Member Profile Picture
    on at

    Thanks, this put me on the right track, although I took me a while before I realized that I have to convert the (textual) value to a value before I format it as text again, i.e.

     

    Text(Parent.Default,"[$-en-US]#.0") results in 2 with no decimals

     

    Text(Value(Parent.Default),"[$-en-US]#.0") returns 2.0 with one decimal (even if the value is an integer).

     

  • Brian Dang Profile Picture
    3,976 on at

    @Anonymous wrote:

    Thanks, this put me on the right track, although I took me a while before I realized that I have to convert the (textual) value to a value before I format it as text again, i.e.

     

    Text(Parent.Default,"[$-en-US]#.0") results in 2 with no decimals

     

    Text(Value(Parent.Default),"[$-en-US]#.0") returns 2.0 with one decimal (even if the value is an integer).

     


    @Anonymous--I am glad you picked up on that

     

    You might also like this method I use for getting a value if you do not like parentheses:

    Text(Parent.Default*1,"[$-en-US]#.0")

     

  • Community Power Platform Member Profile Picture
    on at

    Interesting, thank you! So you can multiply by 1 any string that can be converted to a number? Neat.

  • Community Power Platform Member Profile Picture
    on at

    Hi,

     

    I am currently also trying to get rid of my decimals, but seem to be stuck.

     

    I have a calculated value in minutes as a single line of text, based on two date/time entries.

     

    =GANZZAHL(([Geplanter Einsatztermin Ende]-[Geplanter Einsatztermin])*1440)

    The value in this example is 60 minutes, see first attachment, which looks as expected in the Sharepoint item.

     

    Now when I pull this single line of text into my Powerapp, I get the "hostile" decimals (second screenshot) 🙂

     

    I tried this:

     

    Text(ThisItem.Geplante_x0020_Dauer*1; "[$-de-DE]#.0")

    and

    Text(Value(ThisItem.Geplante_x0020_Dauer); "[$-de-DE]#.0")

    But end up only getting more dots in between all the 0s, but no matter what I try the 0 remain.

     

     

    With this code:

    Text(Value(ThisItem.Geplante_x0020_Dauer); "[$-de-DE]#")

    I get rid of the dot after the "60", but also the 0s remain 😞

     

    Any ideas?

    Thanks a lot in advance!

     

     

  • Community Power Platform Member Profile Picture
    on at
    . (period)Displays the decimal point in a number. Depends on the language of the custom format, see global apps for more details.

    You need to adjust the format in function of what you're using as decimal separator in German locale.

    If it is the comma, try "[$-de-DE]#,0" with a comma instead of a period.

  • Community Power Platform Member Profile Picture
    on at

    First of all Thanks you verym much for Looking at my issue and soirry for the very late reply.

     

    Following your idea I tried this:

     

    Text(Value(ThisItem.Geplante_x0020_Dauer); "[$-de-DE]#,0")

    And got this in return:

     

    Geplante Dauer

    600000000000000,0

     

    So yes, the "." after the actual number is gone, but the comma shows at the very end after all those 0s.

    Right now I guess I will ignore the 0s and shorten the field in lenght so it looks a tad better.

     

    If you think of anything else I'd love to give it a try.

    Cheers

     

  • Hahanos Profile Picture
    4 on at

    @Anonymous wrote:

    First of all Thanks you verym much for Looking at my issue and soirry for the very late reply.

     

    Following your idea I tried this:

     

    Text(Value(ThisItem.Geplante_x0020_Dauer); "[$-de-DE]#,0")

    And got this in return:

     

    Geplante Dauer

    600000000000000,0

     

    So yes, the "." after the actual number is gone, but the comma shows at the very end after all those 0s.

    Right now I guess I will ignore the 0s and shorten the field in lenght so it looks a tad better.

     

    If you think of anything else I'd love to give it a try.

    Cheers

     


    Try using Substitute function in order to convert "." to "," and vice versa.

     

     

     

  • RyanXExner Profile Picture
    96 on at

    Thank you @mr-dang, still helped me in 2020!

  • Community Power Platform Member Profile Picture
    on at

    I was implementing this within a Vertical Gallery and the data source was an Excel file on OneDrive.

    In this case, I had to format the field like this

    Text(Value(ThisItem.Name),"[$-en-US]$#,##0")

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard