Decimal View

Hii, need some advice for my app. So, my app have table data which contain quantity column and was made decimal for column data type. If i want to add "1"on output data showing up “1.000”, how can i fixed this case if i do not want the data output showing up “1.000” just “1”

Thank you

Hi,

Number(), returns the Integer equivalent
Mod(),returns the remainder of dividend divided by divisor

if a given value, we take it to a virtual text column and apply an if

if remainder >0 = value decimal
if not = number()

IF(MOD([yourDecimal],1)>0,
  [yourDecimal],
  NUMBER([yourDecimal])
)

https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/How-to-Hide-Decimal-when-decimal-was-zero-or-0-show-when-decimal/m-p/462998

2 Likes

Hi, thanks for your advice

but it did not work on my app, so i just applied " SUBSTITUTE([MyDecimal],“.000”,“”) " on my virtual text column and works

1 Like