Invoice Dataset for Financial Analysis
This ready-made invoice dataset is suitable for financial analysts and students practicing data analysis. It includes 26,082 rows across 4 tables, covering a date range from 2022-01-02 to 2024-12-31. A free sample is available, with full download requiring credits.
At a glance
- 4tables
- 26,082rows
- 23columns
- Jan 2022 – Dec 2024date range
The 4 tables
preview and data dictionary per tableCustomers customers · dimension table · 5,000 rows
Contains information about each customer.
Preview
| customer_iduuid | first_namestring | last_namestring | emailstring | citystring | statestring | signup_datedate |
|---|---|---|---|---|---|---|
| 6b67b28f-d528-4fc9-b242-c1ef2c412a07 | Eleanor | Smith | [email protected] | Los Angeles | CA | 2023-03-07 |
| 9eb851e0-21fd-462c-beda-06f3b17e5eb5 | Arthur | Stewart | [email protected] | Seattle | WA | 2022-12-19 |
| cec9905f-7fdb-4405-ae46-f4192d6cf0cd | Beatrice | Sullivan | [email protected] | New York | NY | 2023-11-04 |
| 5e9f56e8-2a2f-49a8-9601-7dcf89c8cc30 | Charles | Scott | [email protected] | Dallas | TX | 2020-07-26 |
| bae6614c-3872-4e09-8bbc-590f7575541f | Dorothy | Simpson | [email protected] | San Francisco | CA | 2022-07-31 |
| 83ea9283-cdee-4e6d-a241-44906db33464 | Edward | Stevens | [email protected] | Austin | TX | 2023-12-06 |
| 83187fb0-dd21-438d-afbd-5bc1ebf93e08 | Florence | Stone | [email protected] | Seattle | WA | 2021-01-19 |
| 21679ca5-46e6-4cb7-affc-ce8824d235ee | George | Snyder | [email protected] | New York | NY | 2021-01-29 |
| de013651-9151-440d-b2b4-c712b5896571 | Helen | Spencer | [email protected] | Los Angeles | CA | 2023-12-15 |
| b6ce594c-f097-4cb3-b03e-ddd2db1c2399 | Isaac | Sterling | [email protected] | Dallas | TX | 2024-12-07 |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
customer_ | uuid | Unique identifier for each customer.unique | 6b67b28f-d528-4fc9-b242-c1ef2c412a07 | 0% |
first_ | string | Customer's first name. | Eleanor | 0% |
last_ | string | Customer's last name. | Smith | 0% |
email | string | Customer's unique primary business email address.unique | [email protected] | 0% |
city | string | City where the customer is located. | Los Angeles | 0% |
state | string | Standard two-letter postal abbreviation for the customer's US state. | CA | 0% |
signup_ | date | The date when the customer registered, established prior to or during the 2022-2024 invoice lifecycle. | 2023-03-07 | 0% |
Products products · dimension table · 1,000 rows
Catalog of products and services offered.
Preview
| product_iduuid | product_namestring | categorystring |
|---|---|---|
| ae38f7c1-8a2c-459e-a07c-ade8444b0465 | Strategic IT Roadmap Development | Consulting |
| 3ee22e31-e11a-42af-8ab1-2fbae09da443 | Cloud Migration Advisory Services | Consulting |
| 9d2374b7-bbbc-49a1-bc16-61d6a0432c1b | Cybersecurity Risk Assessment | Consulting |
| ef1576f5-4575-423a-a530-38bf8edbf067 | Digital Transformation Strategy | Consulting |
| b183df4b-2812-4f58-90b9-9155f3890919 | Data Analytics Consulting Package | Consulting |
| 948599c7-1dba-405b-9387-62d36b34d663 | Supply Chain Optimization Consulting | Consulting |
| 1761e0db-6d70-4342-a792-8636bcbd9518 | Customer Experience Enhancement | Consulting |
| c9392227-9b41-4784-bead-b65fe0434cc7 | AI Implementation Strategy | Consulting |
| 5a55d03a-494d-4246-a6b6-3afc488dd4b9 | Enterprise Resource Planning (ERP) Consulting | Consulting |
| dace564b-dc61-45c3-9979-0057507f6e50 | Business Process Re-engineering | Consulting |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
product_ | uuid | Unique identifier for the product catalog item.unique | ae38f7c1-8a2c-459e-a07c-ade8444b0465 | 0% |
product_ | string | Descriptive name of the product, subscription, hardware asset, or service package. | Strategic IT Roadmap Development | 0% |
category | string | Primary industry classification category for the catalog item. | Consulting | 0% |
Invoices invoices · table · 5,000 rows
Records of all invoices issued to customers.
Preview
| invoice_iduuid | invoice_datedate | due_datedate | total_amountdecimal | statusstring | customer_iduuid |
|---|---|---|---|---|---|
| cd9554bc-1b0a-4b4d-b60a-a3e939799adc | 2024-06-10 | 2024-07-10 | 9799.75 | Paid | e7514d79-8251-4d52-87bb-e97f1383bfc1 |
| 21be4952-adbe-4703-b72a-2d3244af20a2 | 2024-02-13 | 2024-04-13 | 14613.03 | Paid | b2f5b813-8654-49df-84f2-ae98249d2245 |
| 20eacccd-9666-49fa-a0ec-aaec50f8775b | 2024-07-26 | 2024-09-24 | 9267.14 | Paid | f858d8dd-d37e-4e83-9b87-095064b24a3b |
| 779da75b-a441-4311-bdd2-78c9a4dbac56 | 2024-03-11 | 2024-04-10 | 11151.63 | Paid | 6f1a784a-7458-4976-909a-c2fd32852e22 |
| c6f9d64e-203f-4e60-97eb-fe163e0d53d2 | 2024-11-26 | 2024-12-11 | 1914.71 | Paid | 40565337-790c-4463-b6cf-307e3f111a25 |
| 96665369-97c9-4c81-8cb7-88b6300db168 | 2023-11-09 | 2023-11-24 | 2060.41 | Paid | 0b7d87d7-8248-4855-9b88-5ed9bdb60d20 |
| e0d31cc2-aee8-454a-95bc-e04c8eb0f4a6 | 2022-11-15 | 2022-11-30 | 13364.7 | Paid | c722b994-8e38-4111-8f99-b53d4d7e6e7f |
| b737ec14-26d4-47f1-9108-54b7ddd34076 | 2024-11-15 | 2024-12-15 | 12992.88 | Paid | 20d88b52-2bfc-4a95-be66-088fa0bb8d15 |
| 34aa1fb7-8a5d-4f0c-b6de-93a63552ce49 | 2022-06-18 | 2022-08-02 | 9466.21 | Paid | d21b2d4d-3f58-4dc6-95cb-02664dfe19eb |
| ba39a014-f404-4554-901c-0bafc63ee213 | 2024-06-13 | 2024-07-28 | 8222.5 | Paid | 90d5fc4d-5859-40a9-9a13-80de1e58fcfe |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
invoice_ | uuid | Primary key unique identifier for the invoice.unique | cd9554bc-1b0a-4b4d-b60a-a3e939799adc | 0% |
invoice_ | date | Date when the invoice was issued to the customer. | 2024-06-10 | 0% |
due_ | date | Date by which payment is expected, capped strictly on or before 2024-12-31. | 2024-07-10 | 0% |
total_ | decimal | Total gross amount of the invoice, representing the sum of underlying line totals. | 9799.75 | 0% |
status | string | Current processing or payment status of the invoice. | Paid | 0% |
customer_ | uuid | Foreign key to customers.customer_id. | e7514d79-8251-4d52-87bb-e97f1383bfc1 | 0% |
Line items line_items · fact table · 15,082 rows
Details of individual items within each invoice.
Preview
| line_item_iduuid | descriptionstring | quantityinteger | unit_pricedecimal | line_totaldecimal | invoice_iduuid | product_iduuid |
|---|---|---|---|---|---|---|
| 11a0fa26-3eeb-4657-ad37-4bfa73ad6f81 | Children's storybook collection, 5 books | 1 | 52.15 | 52.15 | 21be4952-adbe-4703-b72a-2d3244af20a2 | 27be9aee-96bb-47cb-9094-d6780ac7773f |
| 5c105ed1-09d0-45e5-8974-91612a3af4bc | Reusable grocery bags, set of 3, assorted designs | 3 | 65.2 | 195.6 | cd9554bc-1b0a-4b4d-b60a-a3e939799adc | 6b3588cb-3891-4fc1-8d42-8e0c1ea0291a |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
line_ | uuid | Unique identifier for the invoice line item. | b087514f-68d3-4486-9bf3-8db5ede6c047 | 0% |
description | string | Item description or billing explanation for the purchased product or service. | Gourmet chocolate assortment, 24 pieces | 0% |
quantity | integer | Number of units purchased in this line item. | 1 | 0% |
unit_ | decimal | Price per individual unit billed. | 74.02 | 0% |
line_ | decimal | Calculated total for the line item equal to quantity multiplied by unit_price. | 74.02 | 0% |
invoice_ | uuid | Foreign key to invoices.invoice_id. | 9ecd77e3-7836-4287-8f5c-b985914cdb2e | 0% |
product_ | uuid | Foreign key to products.product_id. | 9cd91c24-fc9a-4a08-8c26-54a3e8015ae9 | 0% |
How the tables join
invoices.customer_id references customers.customer_idmany to one: each Invoices row points to one Customers rowline_items.invoice_id references invoices.invoice_idmany to one: each Line items row points to one Invoices rowline_items.product_id references products.product_idmany to one: each Line items row points to one Products row
Questions to answer with it
What is the total invoice amount for each customer?
Join invoices and customers tables on customer_id and group by customer.
tables: invoices, customers
Which products or services are most frequently invoiced?
Join line_items and products tables on product_id and count occurrences of product_name.
tables: line_items, products
How does the average invoice value change over different periods?
Group invoices by year or month using invoice_date and calculate the average total_amount.
tables: invoices
Create a pivot table showing total invoice amounts by customer state and invoice status.
Join invoices and customers, then group by state and status, summing total_amount.
tables: invoices, customers
Starter SQL
run against this data before publishingTable names match the SQLite file and the SQL script.
Total Invoice Amount Per Customer
SELECT c.customer_id, c.first_name, c.last_name, SUM(i.total_amount) AS total_spent
FROM customers c
JOIN invoices i ON c.customer_id = i.customer_id
GROUP BY c.customer_id, c.first_name, c.last_name
ORDER BY total_spent DESC
LIMIT 20;Top 5 Most Invoiced Products
SELECT p.product_name, COUNT(li.product_id) AS invoice_count
FROM line_items li
JOIN products p ON li.product_id = p.product_id
GROUP BY p.product_name
ORDER BY invoice_count DESC
LIMIT 5;Average Invoice Amount by Month
SELECT STRFTIME('%Y-%m', invoice_date) AS invoice_month, AVG(total_amount) AS average_invoice_amount
FROM invoices
GROUP BY invoice_month
ORDER BY invoice_month
LIMIT 20;Customer Invoice Count with Window Function
SELECT c.customer_id, c.email, COUNT(i.invoice_id) AS invoice_count, RANK() OVER (ORDER BY COUNT(i.invoice_id) DESC) as customer_rank
FROM customers c
JOIN invoices i ON c.customer_id = i.customer_id
GROUP BY c.customer_id, c.email
LIMIT 20;Load it with pandas
import pandas as pd
# Unzip the CSV download first: one file per table
customers = pd.read_csv("customers.csv")
products = pd.read_csv("products.csv")
invoices = pd.read_csv("invoices.csv")
line_items = pd.read_csv("line_items.csv")
# Join invoices to customers
df = invoices.merge(customers, left_on="customer_id", right_on="customer_id", how="left", suffixes=("", "_customers"))
print(df.groupby("state").size().sort_values(ascending=False))Using it in your tool
- Excel
- Each table is provided as a separate sheet. Use Power Query to join tables or XLOOKUP for lookups. Create a PivotTable on the 'invoices' sheet, using 'customers.state' and 'invoices.status' as rows/columns and 'total_amount' as values.
- Power BI
- Load all tables. Create relationships: customers.customer_id to invoices.customer_id, and products.product_id to line_items.product_id. Create measures like Total Sales = SUM(invoices[total_amount]) and Average Invoice Value = AVERAGE(invoices[total_amount]).
- SQL
- Load the SQLite or SQL relational download. Use foreign keys to join tables: invoices.customer_id to customers.customer_id, and line_items.invoice_id to invoices.invoice_id, line_items.product_id to products.product_id.
- Python
- Use pandas to load CSV or Parquet files. Merge tables using pd.merge() and perform analysis. Example: df_invoices = pd.read_csv('invoices.csv'); df_customers = pd.read_csv('customers.csv'); merged_df = pd.merge(df_invoices, df_customers, on='customer_id').
Formats available
- CSV (zip)One CSV file per table, zipped
- Excel workbookOne worksheet per table
- SQLite databaseA ready-to-query database file with every table
- Parquet (zip)One Parquet file per table, zipped
- SQL scriptCREATE TABLE with primary and foreign keys, then INSERTs
- CSVA single CSV file
- JSONA single JSON file
How this data was generated
Synthetic data. Every row was generated: no real people, customers or companies are in this dataset.
Synthetic data generated by GoMask DataFactory from a relational blueprint: keys, links and rules are enforced in code, text columns are filled by a language model. No real people, companies or transactions.
- Data generated using GoMask DataFactory.
- Synthetic data mimics common invoice structures and fields.
- Includes relationships between customers, products, and invoices.
- Checked by an automated quality gate: unique keys, no orphan foreign keys, required columns filled, declared rules and date ranges (realism score 92).
Limitations
- The data is synthetic and does not represent actual transactions.
- Limited to 4 tables, may not cover all complex business scenarios.
- No geographical data beyond US states for customers.
- Distributions and correlations are modelled, not measured from real records.
blueprint · invoice-dataset
Scale this dataset
Same tables. As many rows as you need.
Open the blueprint behind these 4 tables in Data Factory: keep the relationships, change a column, and generate it at the size you need.
- 200,000 rows
- 1,000,000 rows
- Tables
- customers, products, invoices, line_items
- Licence
- yours to use, including commercially
- API slug
- invoice-dataset