cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Beat
Advocate V
Advocate V

Round() and Text() not working on phone

I want to display a value in ##.# format. I tried both
Round(ThisItem.yesPct * 100,1) and
Text(Round(ThisItem.yesPct * 100,1),"[$-en-US]#.#")

Both work perfectly fine on the PC but on the phone (as well viewed in browser) it just renders a string of digits

helpful_browser.png     helpful_phone.png

How can I fix this?

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @Beat ,

Do you need the round function or do you just want to display two decimal places?
If the latter, try Text(ThisItem.yesPct * 100,"#,###.#")

 

@WarrenBelzmany thanks for the prompt answer. This works on the PC but for some reason drops the decimal but keeps the decimal point

 

helpful_browser.png

On the phone still the same, 2500000% helpful

I tried a twice-cooked method whereby I have a hidden label

lblyesPct_1.Text = Round(ThisItem.yesPct * 100, 1)

and a visible label

lblyesPct.Text = Text(lblyesPct.Text, "#,###.#")

 

This suppresses the decimal point if no decimals (I'd still prefer to show it as 25.0% rather 25% but ok, can live with that)

But again, no change on the phone.

Well done @Beat - I am glad I put you on the right track

 

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

@Beat 

I had similar issues with an app I made awhile ago, here's how I got my gallery to display percentages like this 95.12 % etc

 

- data source, SharePoint list

- column is type Number with decimal places set to 2

- users enter values between 0-100

- formula used to display values in gallery:

Text(ThisItem.Pct, "00.00 %")

 

If I use ##.##% it drops trailing zeros

Hi @Beat 

Out of curiosity, I have just created a small test app with source fields in SharePoint of 0.##### and your formula in PowerApps.

I have used the Display as Percentage SP setting on two of the four fields with normal decimal places in the others.

The labels on all display on an iPad (fairly new) and a Samsung Tablet (about 5 years old) exactly as on the PC - formatted to one decimal place. This may be device/OS Version specific, but that really does not help you.

@Eelman has posted a solution if you want to get rid of your percentage format in SharePoint (which will always work as you are not doing the rounding and division)

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,206)