Anshruta Thakur
← All work

Forecasting revenue on contracts that don't behave.

Four fee types, two invoicing models, and project timelines that move. I built the Power BI model leadership and finance use to track revenue and invoicing in real time, project month-end totals, and generate the detail behind 179D invoices.

Role

Sole data scientist

Worked with

CEO · Finance Director · Delivery

Stack

Power BI · DAX · Salesforce

Status

In production

01 — Problem

Nobody could say what was going to bill next.

Revenue and invoicing weren't the same number, and neither was straightforward to project. Revenue depended on hours already worked and what teams still planned to deliver that month. Invoicing depended on the client's fee type, project milestones, planned hours, and when those milestones were expected to occur.

Leadership needed to know not just what had been invoiced so far, but where the month was likely to finish — by fee type, client, and project. Finance also needed enough detail behind those numbers to explain an invoice when a client questioned it.

Knowing what has billed isn't enough when you're trying to manage where the month will finish.

02 — Messy data

Four fee types. Two invoicing models.

The first discovery was that the four contract types don't vary by degree. They recognise revenue on fundamentally different logics:

On top of that, the source data fought back: milestone dates buried at the project level of a Salesforce account → opportunity → project hierarchy, duplicate records, missing dates, and contracts amended mid-flight without the original terms being versioned.

03 — Approach

Model the business rules, then roll them up.

04 — Architecture

How it fits together.

Salesforce project data Hours · Milestones · Fee Type · Invoice History Revenue Actual + Planned Hours Invoicing Fee Rules + Project Progress Actual + Month-End Projection Power BI Reporting 179D → Invoice Matrix
Revenue and invoicing are calculated separately, then rolled into one reporting layer.

05 — The report

What leadership can see before the month is over.

A recreation with synthetic clients and numbers, same structure as production. Switch pages, filter by contract type, and click any client to drill through to their milestones.

revenue-invoicingsynthetic data
JanFebMarAprMayJun
actual forecast

Invoiced, June

$296K

Forecast, June

$310K

Variance

−4.5%

two milestones slipped to July

ClientContract typeContractInvoiced to dateJune invoice

Showing six of 100+ active clients.

06 — Outcome

Finance bills from this now.

100+

active clients billed from the engine monthly

4

contract types forecast under their own rules

Manual → generated

invoice detail produced by the report

The executive team and Finance now use the report to plan month-end numbers, investigate billing questions, and trace totals back to individual projects. The added visibility has also surfaced work that may otherwise have gone uninvoiced.

07 — Lessons

What I'd tell myself at the start.

Next project

Fashion demand notes

View project →