Sometimes it’s the small things that break the flow. A missing total on an invoice, a date range that slips past extraction. These gaps may seem minor, but they can quietly disrupt your entire workflow.
You can now automatically derive these values with our data fields calculation – like summing up line items for an invoice total. Our configuration add-on „Date Ranges“ helps you extracting both full and compact formats like “20.–25.05.2025”.
Let’s have a closer look at both data field configurations!
Data Fields Calculation
Never settle for missing values again. Now, if a document lacks a key number like an invoice’s total amount, natif.ai can compute it automatically from existing line-item data. You can use addition, subtraction, multiplication, or division to derive missing values.
How to set up a calculated field:
There are two options to use the calculation rules, when adding data fields in your custom extraction:
1. Adding a new data field: Implementing as field type “Calculated Number/ String/ Date”
Select the field type “Calculated Number” (or “Calculated String”/ “Calculated Date”). Name your new field and build the calculation with the formula builder. Using our visual formular builder makes it easy to create the right calculation – you just have to chain terms (other existing extractions fields, constants) with operators (+, -, *, /).

2. Adding a backup option: Implementing as “Fallback Calculation”
You can also define fallback calculations as backup option if the AI doesn’t find the data on the document. To do so, you go to the section “Expert Settings” within the settings of a “Number”, “String” or “Date” data field.
Using our visual formular builder makes it easy to create the right calculation – you just have to chain terms (fields, constants) with operators (+, -, *, /).
Note: The calculation is only performed if there is no data field on the document or if the model fails to identify it.
Good to know:
Calculated fields execute in dependency order, meaning that one calculated field can be used to feed into another – e.g., use a subtotal field within a larger formula (Dependency‑Aware Aggregation).
Practical examples to put automated calculations to work:
Let’s look at some practical examples of calculations you can set up. These will help you see how to turn raw data into exactly the values you need.
• Table Aggregation
Sum a column of amounts in an expense report into a single “Total Expenses” field.
• Field Summation
Calculate an invoice’s TotalAmount as the sum of ItemAmount1 + ItemAmount2 + ….
• Field Difference
Compute NetAmount by subtracting the invoice TaxAmount from the GrossAmount.
• Multiplicative Rates
Derive TaxAmount by multiplying TaxRate × TaxableBase.
• Division for Unit Prices
Calculate UnitPrice as TotalAmount ÷ Quantity.
• Cross-Type Handling
– Strings: Concatenate fields and constants (e.g., FirstName + ” ” + LastName).
– Dates: Add the due date stated in number of days (e.g. “14”) to the document date stated as an actual date to calculate the due date in date format (Date + N Days)
– Floats: Standard arithmetic across monetary or measurement values, including support for constant values.
Date Ranges Extraction
Dates come in many formats. While we’ve always picked up fully spelled-out ranges (e.g., “20.05.2025 to 25.05.2025”), we’ve now added support for compact formats like “20.–25.05.2025.” This means our extractions cover now everything – from fully written-out spans to abbreviated expressions.
How to set up a date range field:
When adding data fields to your custom extraction, you can now select the field type “Date Range”. It’s as easy as just selecting the field.
When you are annotating your documents, you always have to select the start date and end date as sub-types of your date range, so the AI learns where to find the necessary fields for the range.
Note: For single dates, so a date range of 1 day, use the type “1 Date”.
You can also implement a date range via a calculated field. Jump back to “Data Fields Calculation” to get more information on this setting.
When to use date ranges:
Let’s have a look at a few examples of how date ranges field can be useful.
• Service period:
Can sometimes be a single full day (in case my repair happened on one day, “12.05.2025”), multiple fully written-out days (“12.05.2025-14.05.2025”), and partially written-out multi-day timespans (“12.-14.05.2025”)
• Hotel invoices:
Extracting the stay period from a hotel
• Enrollment certificates:
Defining the start and end dates of a semester
Start your seamless workflows now
Small gaps in your data can slow down entire workflows. By putting these tools to work, you’re not just cleaning up your data – you’re making it smarter, more consistent, and ready to flow seamlessly through your processes.
Now it’s your turn: Try out a few of the examples above in your own setup and see how much smoother your workflow becomes.