Hello everyone!
I am still relatively new to Power Apps, but it's been a very interesting process and I'm excited about what can be accomplished with this! I am creating a Canvas App that has editable forms for users, but defaults to the existing data in the beginning. This seems to work well so far, except I am unable to format my data cards to show percentages, where the data on the table is a decimal.
For example, the field "sales_perc" in my table has the decimal value of 0.09. In my data card's input field, it shows up as 0.09. However, I want it to show 9.00% instead. I've tried multiple ways of doing this, mostly messing around with the Default property (currently ThisItem.cr9f3_sales_perc ). I tried Text(ThisItem.cr9f3_sales_perc*100)&"%", which gets me to "0.09" and Text(ThisItem.cr9f3_sales_perc, "0.00%"), which gets me "0.0009". Just going off how Excel handles formatting, I would think one of these options would work, but that does not seem to be the case. Help!
You're welcome @powercrusher - glad you got that working.
It does actually make a difference! I was making the formula change at the data card level, but this formatting adjustment had to be done at the text input control level (after I removed the data card level default). Thanks!
timl,
That's what it is currently set to and doesn't seem to make a difference. I'm almost resigned to leaving it as "9" (after multiplying by 100) and using the label to indicate that it is in %, but it's not a good look. I'm surprised how hard and frustrating it has been to just format a decimal to percentages. Is there anywhere else I should be looking?
If you set the Text property of the text input control (rather than the card), does that make a difference?
Neither of these options seem to be working. My format was "Number", and I've changed it to "Text" as well, but it is still showing "0.09".
Some of my properties are as follows:
Data card:
Datafield: "cr9f3_sales_perc"
DisplayName: "DataSourceInfo[@Table],DataSourceInfo.DisplayName,"cr9f3_sales_perc")
Required: false
Default Value: Text(ThisItem.cr9f3_sales_perc*100)&"%"
Update: Value(DataCardValue1.Text) --- should this be adjusted as well?
Within the text input:
Mode: TextMode.SingleLine
Format: TextFormat.Text
Maybe I'm missing something here???
As you mentioned, the following should work.
Text(ThisItem.cr9f3_sales_perc*100) & "%"
I suspect the problem is that the 'format' property of your text input control is set to 'number'. If you set it to 'text', that might do the trick.
Text(ThisItem.cr9f3_sales_perc)*100&"%"
Value(ThisItem.cr9f3_sales_perc)*100&"%"
Please click Accept as solution and Thumbs Up. if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
You can connect with me on LinkedIn
WarrenBelz
89
Most Valuable Professional
MS.Ragavendar
60
stampcoin
48