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
How can I fix this?
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
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.
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)
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
200 | |
47 | |
45 | |
45 | |
39 |
User | Count |
---|---|
279 | |
81 | |
81 | |
80 | |
67 |