Persistent Decimal Calculation Bug – Percentage Interpreted Incorrectly

Hi everyone,

I’m struggling with a persistent issue in AppSheet that I’ve been unable to solve, even after multiple rebuilds and hours of testing.


Context

I’m building a portfolio management app where each stakeholder owns a percentage of an asset. When a revenue-generating event (called a Race) occurs, a bot is triggered and is supposed to create a row in the Transaction table for each owner.

The Earnings are calculated by:

appsheet

CopierModifier

LOOKUP([Race_ID], “Race”, “Race_ID”, “Earn”) * [Percentage]

 

This seems straightforward… but something is going very wrong.


Issue

Even though [Percentage] is defined as a Decimal (2 digits), AppSheet consistently multiplies by 5 instead of 0.05.

So I get:

  • :cross_mark: 2125 × 5 = 10625
    Instead of:

  • :white_check_mark: 2125 × 0.05 = 106.25


What I’ve already tried

Structure:

:card_index_dividers: Tables:

1. Ownership

  • Ownership_ID – key

  • Owner_email – text

  • Horse_ID – ref

  • Percentage – set to Decimal, 2 digits, with values like 0.05, 0.10

  • AdjustedPercentage (virtual) – multiple formulas tested

2. Race

  • Race_ID – key

  • Horse_ID – ref

  • Earn – Decimal

3. Transaction

  • Transaction_ID – key

  • Ownership_ID – ref

  • Race_ID – ref

  • Owner_email – text

  • Percentage – Decimal

  • Earnings – Decimal (calculated)


Automation setup

  • A bot triggers when a new Race is added

  • It runs an action Create transaction owner on all related Ownership rows

  • That action uses Set these columns to populate Transaction, including:

    • Percentage = [_THISROW].[Percentage]

    • Earnings = LOOKUP(…) * [Percentage]


Things I’ve tested (and ruled out):

  • :white_check_mark: Changed column type to Decimal (no Enum, no Text)

  • :white_check_mark: Used [_THISROW].[Percentage] to pass values

  • :white_check_mark: Used LOOKUP(…) from Ownership directly

  • :white_check_mark: Created virtual columns like AdjustedPercentage = NUMBER([Percentage]) / 100

  • :white_check_mark: Tried SUBSTITUTE([Percentage], “,”, “.”)

  • :white_check_mark: Changed locale (en-US, fr-CA) in:

    • AppSheet App settings

    • Table settings

    • Google Sheets

    • Browser

Still… the value 0.05 is treated as 5 when used inside an action to create a new row.


Bonus symptoms:

  • 0.10 sometimes behaves like 1 (i.e. Earn × 1 = full amount)

  • Even with a clean setup and fresh test values, the issue persists

  • The only way I’ve ever gotten the right value (106.25) is by hardcoding it


What I’m looking for

A reliable way to:

  • Use real Decimal percentages (like 0.05)

  • Multiply them in an action without AppSheet interpreting 0.05 as 5

  • Avoid clunky conversions or locale-dependent hacks

If anyone has faced this in a financial context — or if you’ve worked around AppSheet’s quirks with decimals in Set these columns actions — I’d love to learn from your solution.

I can share a stripped-down test app if that helps.

Thanks in advance :folded_hands:
– Martin

LOOKUP([Race_ID], “Race”, “Race_ID”, “Earn”)

should be

LOOKUP([_THISROW].[Race_ID], “Race”, “Race_ID”, “Earn”).

I’m gonna bet the Earn column is of type Percent. If so, LOOKUP([Race_ID], “Race”, “Race_ID”, “Earn”) produces a Percent result. Multiplying a Percent value by a Decimal value converts the Decimal to Percent and produces a Percent result. The internal implementation of the Percent type involves some magical behavior that can produce unexpected results. The Percent type is best used only as a display type.

Thanks for the suggestion! I had the same thought at first, but I can confirm the Earn column is already set to Decimal (not Percent).
I double-checked both the column type in the Race table and the value format — everything is properly configured.
Unfortunately, the issue still persists even with a clean Decimal-to-Decimal multiplication.

Still, I really appreciate your insight — it helped me rethink how AppSheet might silently coerce types depending on context. If you have any other ideas, I’m all ears!

Thanks again,
Martin

Please post screenshots of this configuration.

Hi, see my screenshots,

Just to clarify:
It’s a bot that triggers when a new race is created.
This bot runs an action that writes one row into the Transaction table for each owner, based on data from the Ownership table.

The Race_ID is passed directly into the transaction, and I now use that to calculate Earnings with:

[Percentage] * LOOKUP([Race_ID], “Race”, “Race_ID”, “Earn”)
That part is finally working properly — thanks again for the help!