Table transformations

How to Add 20% to a Price, Round It, and Reject Invalid Values

2026-06-20
Task

The price_raw column contains either an integer or a decimal price with a dot or comma. price_final must contain only a positive price: add 20%, round to the nearest integer, and leave unsupported or rounded-to-zero values blank.

Short answer

Create price_final from price_raw and apply exactly six rules using the labels shown in the interface: Trim spaces at edges, a format guard with Not a regular expressionDo not export field, a guard that rejects non-positive values with Less than or equal set to 0Do not export field, Increase by % with 20, Round without a separate operand, and the same non-positive-value guard after rounding.

How to Configure It in Eofferix

  1. Add or open the target price_final column and select price_raw as its source. These names belong only to the example; select the actual price columns in your template.

    Opening the target price_final column rules in the Eofferix table editor
    Open the target price column and verify that its source is the actual incoming price.
  2. Add the first three rules in this order: AnyTrim spaces at edges; Not a regular expression with ^\d+(?:[.,]\d{1,2})?$Do not export field; Less than or equal with 0Do not export field. The expression accepts digits plus an optional decimal part of no more than two digits.

  3. Add the remaining three rules: AnyIncrease by % with 20; AnyRound; then Less than or equal with 0Do not export field. The Round action has no visible operand field in this interface: it uses the default behavior, rounding to the nearest integer with step 1.

    Six Eofferix rules that validate a price, add 20 percent, and round the result
    The source is validated first, then increased by 20%, rounded, and checked again so a zero result stays blank.
  4. Apply the rules and inspect the preview with valid prices, an overlong decimal part, zero, a negative number, text, and a small positive price. Export only after the control rows below produce the stated results.

Important. price_raw, price_final, and the 20% increase are only an example. Use your real column names and agreed rate. If 20% represents VAT, first confirm that the source price is genuinely tax-exclusive, that this rate applies, and that the destination channel permits this rounding policy.

Expected Result

Value in price_rawValue in price_finalWhy
999.901200Adding 20% gives 1199.88; the nearest integer is 1200.
14901788A valid integer: 1490 × 1.20 = 1788.
99,95120A comma is accepted as the decimal separator; 119.94 rounds to 120.
0.4210.504 rounds to 1 and passes the final guard.
0.10blank0.12 rounds to 0; the last rule clears that zero result.
12.345blankThe decimal part contains more than two digits.
0blankThe source price is not greater than zero.
-10blankA negative number does not match the accepted format.
USD 100blankA currency marker is outside the accepted format.
blankblankAn empty source value does not become a price.

Checks Before Export

  • All six rules are present in the stated order; Eofferix evaluates them from top to bottom.
  • The expression is ^\d+(?:[.,]\d{1,2})?$: it checks the whole value and allows at most two decimal digits.
  • Increase by % contains 20, while Round has no separate operand.
  • The control values produce exactly 999.901200, 14901788, and 99,95120.
  • The final Less than or equal with 0Do not export field follows rounding; without it, a value such as 0.10 would remain as zero.

Limits of This Example

  • The format check accepts only unsigned decimal notation without internal spaces, thousands separators, or currency symbols; the following rule rejects zero.
  • A dot or comma is treated as the decimal separator. Ambiguous formats such as 1,234 are intentionally rejected because they have three digits after the separator.
  • The result is an integer. If the destination requires cents or a different rounding policy, build and test a separate rule chain.
  • Do not export field clears this target field; it does not delete the entire product row.
  • A percentage increase is mathematically equivalent to multiplying by 1.20, but it does not by itself prove that a tax calculation is compliant. VAT rates and eligible categories vary by jurisdiction; check the European Commission overview of VAT rates and the rules that apply to your sale.

Process data faster with Eofferix

Create a free account to automate catalogs and price lists around your own rules.

Sign up