If you've ever built an invoice in a spreadsheet, you know the routine: type the product, type the price, type the quantity, then manually multiply them together. Do that for every line, then sum it all up at the bottom — and hope you didn't make a typo in the formula.
In this tutorial, we'll build a Simple Invoice Builder where adding a product line instantly calculates its subtotal, and the invoice total updates itself automatically — no formulas required.
Before we can build an invoice, we need a list of products to invoice for.
First create new table here
Create new table called Order
Add two fields: Product Name and Unit Price.
Click here to add fields
Create new field product name and unit price
Next, create an Invoice table — this represents one invoice sent to one customer.
Sidebar showing a new table being created and named Invoice
Add basic fields: Invoice Number and Invoice Date.
Invoice table with Invoice Number and Invoice Date fields added
Here's the key part. An invoice usually has more than one product on it — but instead of manually building a separate table to hold each line, Ambisius handles this for you.
In the Invoice table, add a new column and choose Line Items as the data type.
Adding a new column in the Invoice table and selecting Line Items as the field type
Select Product as the table to pull items from, and add Quantity as a column to track alongside it.
Click here to add field to tracks
Select One to Many to pull data from Product
Pull data from product
Select Product for the related table
This is the final result
Click Save to confirm the your Line Items
Final result of table Invoice
The final structure the Invoice table
Now let's make each line item calculate its own subtotal — unit price multiplied by quantity.
In the Invoice table, add another new column and choose Custom Logic as the data type. Describe what you want: multiply the Product's Unit Price by the Quantity from each line item.
Add Custom Logic data type here
Describe the logic with plain sentence
There will be clarification that you need to confirm, making sure your intention matches system intention.
Clarification by system about the calculation
Click Save to confirm.
Let's put this to work. Add a few products to the Product table.
Add Product table data
Add few products
Now let's put everything together. Create one Invoice record, open its Line Items field, and add a few products with their quantities.
Add Invoice data here
Fill in the data, notice that in Invoice Items section, there is a button, click it to add items inside it.
Button to add more line items
As you can see, you can insert more product and its quantity
Add Invoice items modal
Click in Product picker, and you can pick list of Products that you have entered, no need to manual input.
Product picker
add one record: Laptop Stand (Unit Price $45) and its Quantity 2
Fill in Laptop Stand
Also add one more record: Noise Cancelling (Unit Price $150) and its quantity 1
Fill in Noise Cancelling
This is the final invoice
Final invoice
Watch the Invoice's Total amount update immediately to reflect it.
Calculation (45$ x 2) + ($150 x 1) = $240 in total
Total amount updated
Across these steps, you created:
Try the Live Preview
On this page
Related articles
Explore more product articles and best practices for teams building with Ambisius.
Still Using Spreadsheets?
You Should Try This.
Turn familiar spreadsheets into a structured system built for your business
No commitment. No credit card required.

© 2026 Ambisius. All rights reserved.