cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Techgallagher
Helper I
Helper I

Way to extend decimal places?

I have a data table that is pulling from SQL server and I wanted to know if there was a way to set every column with numbers to default to 3 decimal places? Is this something I can do on the front end with powerapps or is it something I'd have to change on the backend in SQL?

 

For example the 3 there should be 3.000

Techgallagher_0-1599830809895.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
TJO
Resolver II
Resolver II

@Techgallagher You can select each column and adjust the text property, e.g.:

Text(
   Value(
      ThisItem.Height
   ),
   "0.000"
)

 

View solution in original post

4 REPLIES 4
mdevaney
Super User
Super User

@Techgallagher 

Best way to do this is to create a gallery instead of a data table.  Then place a label inside the gallery for each mesaurement and use this code to control the formatting.

 

Text(ThisItem.'Outer Diameter', "0.000")

 

---
Please click "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." 

CarlosFigueira
Power Apps
Power Apps

You can select the column in the data table that you want to configure the number of decimal places, and use the Text function to determine how the data will be shown in its Text property. For example, for the first column, you can use an expression like this:

 

Text(ThisItem.'Outer Diameter', "[$-en-US]0.000")

 

The attached file shows this example. To open it, save it locally, then go to https://create.powerapps.com, then select Open -> Browse, and find the file that you saved.

Hope this helps!

TJO
Resolver II
Resolver II

@Techgallagher You can select each column and adjust the text property, e.g.:

Text(
   Value(
      ThisItem.Height
   ),
   "0.000"
)

 

View solution in original post

Thank you, this worked! Appreciate the help!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,702)