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 / Number formats in Apps...
Power Apps
Answered

Number formats in Apps (mobile) - calculations

(0) ShareShare
ReportReport
Posted on by 91

Hi PowerApps community

 

I have some problems how PowerApps interpretes fraction numbers based on language on the iPhone device

Situation: I have simple App, that should show different colors based on definition in my TextInput

So - in valGreen.Default I put 0.985 - as seen on the pictures below

Later, on Fill I have the following formula:

 

If(Value(txtDaily.Text)>=Value(valGreen.Text),Green,If(Value(txtDaily.Text)>=Value(valYellow.Text),Yellow,Red))

Everything works fine on iPhone with English settings

But i noticed, that if the settings are Danish, it doesn't work as expected. Analysing that, I realised that in Danish 0.985 is not fractional number, because in Danish decimal sign is comma, not dot

In fact if I run the App and change my TextInput from 0.985 to 0,985 (note the comma) - it start showing correctly colors

 

My question is - how to put the default correct fraction number in my TextInput, so it works on both English/Danish devices?

 

Capture.PNG

 

 

Regards,

Yakimo

 

Categories:
I have the same question (0)
  • hpkeong Profile Picture
    2,944 on at

    Hi

     

    May this link, under Global Apps section and custom format language placeholder

     

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

     

    gives you a better answer?

     

    Hope it helps, TQ

     

  • Yakimo Profile Picture
    91 on at

    Hi @hpkeong

     

    I couldn't quite get it

    Shall I type in valGreen.Default Text( 0.985, "[$-en-US]", "en-US" )

    so the danish iPhone can make the comparison correct?

     

    Unfortunatelly I do not have around Danish iPhone, some of my colleagues have, and I cannot test it right away

     

    Thanks

    Yakimo

  • Verified answer
    AndyPennell Profile Picture
    Microsoft Employee on at

    You have the right idea, but a better solution would be

    Text(0.985,"[$-en-US]##.000")

    depending on the range of numbers you need to support. This says "interpret the period in the format string as a decimal point", then "convert to a string in the user's locale" (Danish in your case).

  • Verified answer
    hpkeong Profile Picture
    2,944 on at

    Hi @Yakimo

     

    @AndyPennellis correct. 

     

    Please amend accordingly.

    TQ

  • Yakimo Profile Picture
    91 on at

    Hi @hpkeong@AndyPennell

     

    Thanks both for suggestions.

    I would like to test @AndyPennell's suggestions

    Will do that right away tomorrow in the office, where I have colleagues with Dansih iPhones

    Before that I cannot amend, sorry

     

    Regards,

    Yakimo

  • Yakimo Profile Picture
    91 on at

    Thanks for the solution, @AndyPennell

    It solved my issues

     

    regards,

    Yakimo

     

  • jlke-as Profile Picture
    130 on at

    Hi... I have a more or less similar issue...

    I'm from Denmark, so I would like to use comma to separete a fraction number... I would assume that there was a setting somewhere in Power Apps to make Power Apps calculate in "my way..." - but I cannot find this kind of setting any where... Can you help me?

    In a table I have some numbers (hours) - and I would like to the user to split the hours into groups. In this process the user should see:

    1) see the total figure to be split (in this case 7 hours)

    2) insert a figure to dedicate to a group (as a default it should show the remaining hours, that needs to be dedicated to a group) 

    3) see the amount of hours that have been split so far...

    jlkeas_1-1688828542064.png

    As you can see, I have managed to all figures shown with comma as separator - but the "15,00" and "25,00" has actually been add as "1,5" and "2,5" (as we do fractions in Denmark)... But Power Apps understands it as "15" and "25" and therefore sums it up to "40" instead of "4" (so now Power Apps thinks that have split 33 hours more than needed)...

    How can I get Power App to do calculations with comma as separator?

     

    wkr Jørgen

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard