Operations

Use ChatGPT to Turn an Expense CSV into a Reviewable Variance Table

Cihan's view: Upload a clean expense CSV, ask ChatGPT for a row-level variance table, then verify the arithmetic, missing values, and review threshold before deciding what needs attention.

Choose another work task →

A budget review is easier when the question is visible in every row. Instead of asking ChatGPT for a vague summary of expenses, give it a small structured CSV and ask for a variance table that a person can check.

This guide uses a fictional expense file. The numbers are practice data. No ChatGPT run or business result is claimed.

Evidence label: documentation-based and illustrative. OpenAI documents that ChatGPT can analyze uploaded CSV files, create tables, run Python-based calculations, and explain assumptions. OpenAI also recommends clear headers and one record per row. The sample file, prompt, and expected arithmetic below are fictional. Source: Data analysis with ChatGPT.

What you will make

You will produce a variance review table with these columns:

  • cost centre
  • category
  • budget EUR
  • actual EUR
  • variance EUR
  • variance percentage
  • review flag
  • source row IDs

The decision is which rows need a human look. It is not an approval to cut spending or accuse a team of overspending.

Before you start

You need ChatGPT with file upload and data analysis available on your account. Feature access, limits, and connected sources can vary by plan and workspace. Use a practice file or an approved export. Remove personal, payroll, bank, and customer data unless your organisation has approved the workspace and handling rules.

Keep the original CSV unchanged. Make a copy for any cleanup and keep the source row IDs intact.

Fictional input

Create a file named q3-expenses.csv with this content:

row_id,cost_centre,category,budget_eur,actual_eur
E-101,Sales,Travel,1200,1380
E-102,Sales,Software,900,810
E-103,Operations,Travel,700,560
E-104,Operations,Training,500,650
E-105,Support,Software,800,960
E-106,Support,Travel,600,600

For a separate arithmetic check, the total budget is 4,700 EUR and the total actual spend is 4,960 EUR. The total variance is 260 EUR. These figures are calculated from the fictional rows, not generated by ChatGPT.

Use a review threshold of 10 percent for this exercise. That threshold is an editorial example, not a finance policy.

Three steps

1. Check the file before upload

  1. Open the CSV in a spreadsheet or text editor.
  2. Confirm that the first row contains headers.
  3. Confirm that each later row has six values.
  4. Confirm that every row_id is unique.
  5. Check that budget_eur and actual_eur contain numbers, not currency symbols or blank text.
  6. Confirm the six fictional IDs are present: E-101 through E-106.

Do not silently fill a missing value. Record it as missing and decide how it should be handled.

2. Ask for a bounded variance table

Upload q3-expenses.csv to a new ChatGPT conversation and paste this prompt:

Analyze only the uploaded file q3-expenses.csv.

This is a fictional practice dataset. Do not use outside data and do not invent policy, causes, owners, or savings.

First report:
1. the row count;
2. the column names;
3. duplicate row_id values, if any;
4. missing or non-numeric values in budget_eur and actual_eur.

Then create a row-level table with exactly these columns:
row_id | cost_centre | category | budget_eur | actual_eur | variance_eur | variance_pct | review_flag | source_check

Calculate:
- variance_eur = actual_eur - budget_eur
- variance_pct = variance_eur / budget_eur * 100
- review_flag = REVIEW when the absolute variance_pct is at least 10, otherwise CHECK

Round variance_pct to one decimal place for display, but use the unrounded value for the flag.
Set source_check to the exact row_id used. Do not combine rows.

After the table, provide:
- total budget_eur;
- total actual_eur;
- total variance_eur;
- the IDs flagged REVIEW;
- assumptions or unresolved data issues.

Show the calculation method or code used. If you cannot verify a value, write UNKNOWN instead of guessing.
  1. Ask a follow-up only if the first result is incomplete. For example:
Recheck the six source rows one by one. Show the arithmetic for E-101 through E-106 and explain any difference between the row totals and the overall totals. Do not change the source data.

OpenAI says that the analysis environment may run Python code for some tasks. Review the generated code, outputs, and assumptions before relying on the table.

3. Complete the review note

Copy the result into a review note and fill the brackets:

File: q3-expenses.csv
Rows expected / found: 6 / [value]
Duplicate row IDs: [value]
Missing numeric values: [value]
Total budget: 4,700 EUR / model: [value]
Total actual: 4,960 EUR / model: [value]
Total variance: 260 EUR / model: [value]
Review threshold: 10 percent, illustrative only
Rows flagged REVIEW: [IDs]
Decision: [REVIEW FLAGGED ROWS / CORRECT INPUT THEN RECHECK / STOP]
Open question: [what a budget owner still needs to confirm]

Checkable artifact

The finished artifact is the row-level variance table plus the review note. A colleague should be able to trace every output row back to one source ID and recalculate the totals from the CSV without asking ChatGPT another question.

A useful table is not enough by itself. Keep the original CSV, the prompt, the returned table, the code or method shown by ChatGPT, and the human review note together.

Acceptance checks

The workflow passes when:

  • six source rows are found;
  • all six row IDs appear exactly once in the output;
  • no budget or actual value was silently changed;
  • row variance uses actual minus budget;
  • the model totals are 4,700 EUR budget, 4,960 EUR actual, and 260 EUR variance;
  • the 10 percent flag is applied to the unrounded percentage;
  • the flagged rows can be checked against the source;
  • missing data and assumptions are visible;
  • a person records the next decision.

For this fictional file, E-101, E-104, and E-105 should be flagged because their absolute variance percentages are at least 10. E-102 is under budget by 10 percent and should also be flagged under the stated rule. If the output differs, inspect the arithmetic rather than forcing the expected answer.

Troubleshooting

The table has fewer than six rows. Ask ChatGPT to inspect the file row by row and name the missing IDs. If the file is malformed, repair a copy and rerun the check.

The answer gives a total but no traceable rows. Use the exact table schema in the prompt and require source_check to contain the row ID. Do not accept a narrative summary as the review artifact.

A percentage looks right but the flag is wrong. Check whether the tool rounded before applying the threshold. Recalculate from the unrounded values.

ChatGPT uses outside context. Restate that the task is limited to the uploaded file. If the decision depends on external policy, provide the approved policy separately and mark that dependency.

The file contains sensitive data. Stop and follow your organisation’s data handling rules. A successful upload is not proof that the workspace is approved for that data.

The result is incomplete. OpenAI notes that large, complex, or poorly structured files may need narrower questions or smaller files. Ask for specific rows or columns, then compare the result with the original.

Limits and decision

This workflow can organise a small expense export and expose rows for review. It cannot decide whether a variance is justified, change a finance policy, or prove why a cost moved. A neat table can still contain a wrong formula or a wrong source range.

TRY this on a fictional or approved CSV when you can independently recalculate the result.

SKIP it when you cannot verify the source rows, the workspace is not approved for the data, or the decision depends on a policy you cannot provide.

USE the output only as a review table after the source IDs, arithmetic, assumptions, and human decision note agree.

For product capability details, see the OpenAI data analysis documentation.

About Cihan

Creator and operator focused on practical AI for business professionals. Background and editorial approach →