Hi Community,
I have two columns:
Physical column: Total = 20,000
Virtual column: Total Declared = 5,145
I would like to create a VC with the percentage formula which at the minute I’m lead to believe is:
([Total Declared]/[Total])*100
although this formula produces a 0.00% where really I think it should be 25.7%.
Any ideas would be greatly appreciated.
Thanks in advance,
Chris.
@Chris_Jeal
([Total Declared]*100.00)/[Total]
should do the trick
3 Likes
if you define the column as type = Percent, do you need to divide/multiply by 100 at all?
It seems that you do, just tried without the * and the calculation didn’t work, just left me with 0.00.
Chris.
There seems to be a bug here.
You should be able to use a Percent column and perform the raw division - “A / B”. It will then automatically convert the value to Percent and display it with the “%”.
In fact, when adding a new row or Editing a row, the VC column will calculate the value correctly.
After a sync is performed, the value reverts to zero. See images below.
Is this a known issue??
Immediately after Editing the row_____________Value goes to zero after a Sync
This issue stems from division of two Number type columns. There are two ways to still use the Percent type VC column and make the correct Percent value “stick”:
-
Re-dfine the number columns as Decimal with ZERO decimal digits. The values are treated like Numbers but are in fact Decimals.
-
Force the result in the VC to be decimal by mult one of them by “1.0” - "A * 1.0 / B"
EDIT: This exact issue was asked back in July but was not reported as a bug. I’ll open one for it.
Bug opened:
[New Bug Encountered: Percent value in VC changes to 0.00% after a Sync](https://community.appsheet.com/t/new-bug-encountered-percent-value-in-vc-changes-to-0-00-after-a-sync/16857) Questions
This issue was originally noticed back in July but was not reported as a bug. https://community.appsheet.com/t/a-strange-occurance-in-a-virtual-column-i-h/3423 The problem seems to stem from defining a VC Percent type column when the values used in the calc the value are of Number type. VC Percent column = Number1 / Number2 [11%20PM] When entering or editing a row, the VC column calculates the value correctly. Once saved and a Sync is performed, The VC column reverts to 0.00%. Editing ro…
2 Likes
YOU CAN USE THIS ( [TOTAL]* 1.0) / [OUTOF]