Decimal with 3 places behind the zero

Jaros
New Member

Is there a way to represent the number 0.025 in appsheet?

I have a recipe app that requires weights of products to be , for example, 25 grams in weight and the price is calculated in KGs.

I tried to use the decimal function but it gave an error so it looks as though this only allows a number with 2 decimal places and I need 3.

5 grams with some items can make a major difference.

I could calculate the cost of 100 grams of the ingredient and then use decimal for that but in my experience asking most people to calculate the decimal of 100 grams could be quite confusing.

Solved Solved
0 5 2,467
1 ACCEPTED SOLUTION

The example of decimal columns settings and entered value I shared allow entry of decimal number with three decimal digits.

Are your settings similar?

It sounds that your Qty needed columnโ€™ s decimal digits setting is 2 instead of 3.

The below example shows an entry of 0.175 as one of the examples given by you with the column settings as shared earlier

View solution in original post

5 REPLIES 5

Could you elaborate where exactly the decimal function is not working as expected, the community can then help you better.

Hi, thanks for the response.

I have ten ingredient columns and ten cost per KG columns and ten cost of product columns.

I also have 10 quantity of product columns so if the user needs to add 25 grams of turmeric, I was hoping they would enter 0.025 into the quantity of product column. to calculate the cost of that ingredient in the recipe.

Example: Rice Recipe

Ingredient 1 - Rice
Cost per KG 1- $10
Qty needed 1- 0.175 (175 grams)
Total cost of Rice 1 - $10 * 0.175 = $1.75

Ingredient 2 - Turmeric
Cost per KG 2- $20
Qty needed 2 - 0.025 (25 grams)
Total cost of Rice 2 - $20 * 0.025 = $0.50

Total cost of Recipe is $2.25

But when entering information into the app, if I put 0.175 or 0.025 in, I get an โ€œEntry is invalidโ€ error. So I round up to 0.18 or 0.03 and it works, and I can submit the entry but this is inaccurate from the point of view of the recipe.

So I would like to know if there is a function I can use to be able to add numbers with 3 decimal points rather than two for more accuracy?

The example of decimal columns settings and entered value I shared allow entry of decimal number with three decimal digits.

Are your settings similar?

It sounds that your Qty needed columnโ€™ s decimal digits setting is 2 instead of 3.

The below example shows an entry of 0.175 as one of the examples given by you with the column settings as shared earlier

With settings of a decimal number such as below a number such as 0.025 can be represented

I had the same issue and found this solution as simple workarround:

  • create a virtual column for the formating ex: "fmt_amount" with Text type
  • use the concatenation operator "&" like this : '""&[amount]' as Formula for the column
  • use fmt_amount for all display and keep amount for calculation

Source: https://www.reddit.com/r/AppSheet/comments/130duee/dynamic_decimal_places/

Top Labels in this Space