Preserving number formatting in a concatenation

I have a [Decimal] column, configured to have 1 integer and 1 decimal, so it always shows as X.X (like 5.0 or 0.5).

I also have a [Concatenation] Virtual Column that merges this [Decimal] and other values in a text string.

Problem is that in the concatenation, the decimal defaults to the standard formatting, showing no decimal places if it’s a whole number.

I thought of writing something like IF(FLOOR([Decimal])=[Decimal],[Decimal]&".0",[Decimal]), but it seems a bit inelegant and overly specific.

Is there a better way?

Solved Solved
0 6 1,883
1 ACCEPTED SOLUTION

Wrap that decimal column with the TEXT expression.

View solution in original post

6 REPLIES 6

Wrap that decimal column with the TEXT expression.

Perfect, that’s what I was looking for. Cheers!

You’re welcome

When concatenate 2 columns how to preserve the zeros ih the left of a mumber. Example:
column 1: 41
Column 2: 003
Concatenate([column 1]; [column 2]),
The result showd come: 41003, but in reality comes 413
How to solve this?
Thank you

AppSheet does not display nor store leading zeros in numeric columns, so there is no way to “preserve” leading zeros where numeric columns are involved. If you want to add leading zeros:

CONCATENATE(
  [Column 1],
  RIGHT(("000" & [Column 2]), 3)
)

worked. thanks a lot.
Its important to maintain a unic ID if you have several plots and inside objects. Example
Plot 1 object 11 (ID 111) the same as Plot 11 object 1 (Id 111)

Top Labels in this Space