MSBA-261 · Lesson 12 of 12 · 21 min

Case study: a profitability model

▶ Video coming soon A video version of this lesson is on the way.

In early November 2026, the director of Lumenvale's Continuing Education unit asked Kwabena for something the college had never had: a model that showed which non-credit courses actually made money. Continuing Education ran evening and weekend courses on all three campuses, from first aid certification to bookkeeping and conversational Spanish. Revenue was easy to find. Costs were not: instructors were paid per teaching hour, rooms were charged at internal rates that differed by campus, materials were bought per course, and marketing was spent on campaigns that covered several courses at once. This capstone works through the model Kwabena designed, applying every lesson of the course. Use it as a worked example, and try each step yourself before reading his answer.

The requirements

Kwabena met the director and the unit's finance coordinator and wrote down the questions the model had to answer.

  • What is the contribution margin, revenue minus direct costs, of each course offering, course, subject area and campus?
  • How does this fiscal year to date compare with the same point last year?
  • Which courses rank in the top and bottom ten by margin per seat?
  • What would margin look like if all marketing were allocated to the courses it promoted?
  • Campus coordinators should see only their campus; the director sees everything; no one in this model needs individual student names.

The sources

The previous course built the registration side: Course Registration and Course Offering tables in Dataverse, from an app Signe built the year before, and a monthly refunds file from finance. For costs, finance supplied three more sources: instructor timesheets by offering and date, an internal room charge table by campus and room type, and a materials and marketing ledger with one row per invoice line, some tagged to an offering and some tagged only to a campaign.

Step 1: facts, dimensions and grain

Kwabena's first decision was the fact tables and their grains.

Fact tableGrainKey numbers
CE RegistrationsOne learner in one course offeringFee charged, refund amount, seats
Instructor HoursOne instructor on one offering on one dateHours, hourly rate, instructor cost
Room UseOne offering on one date in one roomHours, room rate, room cost
Direct CostsOne ledger line tagged to an offeringMaterials cost
Campaign CostsOne ledger line tagged to a campaignMarketing cost

Merging these into one wide table would have mixed grains: an offering's materials cost repeated on every registration row would multiply it by the class size. Keeping five facts with shared dimensions avoided that. The dimensions were Date (the college's marked date table with fiscal attributes), Campus, Course Offering, Course, Subject Area and Campaign. Course and Subject Area were flattened into the Course Offering dimension, following the star schema advice, giving one Offering dimension with offering, course, subject area and delivery mode columns.

A model diagram. Five fact tables, CE Registrations, Instructor Hours, Room Use, Direct Costs and Campaign Costs, are arranged in a row. Above them, dimensions Date, Campus and Offering connect through a shared line to the first four fact tables. Campaign Costs connects to Date by a separate line and to a Campaign dimension. A bridge table, Campaign Offering, sits between Campaign and Offering.
The Continuing Education profitability model. Shared dimensions connect five fact tables; a bridge table links campaigns to the offerings they promoted.

Step 2: relationships

The first four fact tables related many-to-one to Date, Campus and Offering, with single cross-filter direction. Campaign Costs related to Date and to a Campaign dimension, but not to Offering or Campus, because campaign spending had no single offering or campus. Each date relationship used the integer DateKey. Instructor Hours had two dates, the teaching date and the pay period end date; teaching date was active and pay period end inactive, for the one finance report that needed it.

Campaign Costs could not relate to Offering directly, because one campaign promoted several offerings. Kwabena built a bridge table, Campaign Offering, with one row per campaign and offering it promoted, and a weight column giving each offering's share of the campaign, based on its planned seats. Campaign related one-to-many to the bridge, and the bridge related many-to-one to Offering. He kept the bridge-to-Offering relationship single direction and moved the allocation into a measure, rather than switching on bidirectional filtering.

Step 3: base measures

He wrote explicit base measures, formatted and described, in a Measures table with display folders for Revenue, Costs and Margin.

Base measures. Line-level costs use SUMX; every ratio aggregates first and divides second.
Net Fees = SUM ( 'CE Registrations'[Fee Charged] ) - SUM ( 'CE Registrations'[Refund Amount] )

Seats Sold = SUM ( 'CE Registrations'[Seats] )

Instructor Cost = SUMX ( 'Instructor Hours', 'Instructor Hours'[Hours] * 'Instructor Hours'[Hourly Rate] )

Room Cost = SUMX ( 'Room Use', 'Room Use'[Hours] * 'Room Use'[Room Rate] )

Materials Cost = SUM ( 'Direct Costs'[Amount] )

Direct Cost = [Instructor Cost] + [Room Cost] + [Materials Cost]

Contribution Margin = [Net Fees] - [Direct Cost]

Margin per Seat = DIVIDE ( [Contribution Margin], [Seats Sold] )

Margin Rate = DIVIDE ( [Contribution Margin], [Net Fees] )

Margin per Seat and Margin Rate are ratios, so they are measures, not calculated columns. A column dividing each registration's fee by its seats would have produced the wrong total, exactly the mistake from earlier in the course.

Step 4: allocating marketing

The director's fourth question needed campaign costs shared out to offerings by weight. The allocation runs over the bridge table: for each campaign-offering pair visible in context, take the campaign's cost times the offering's weight.

Allocating each campaign's cost to the offerings it promoted, using the bridge table's weights.
Allocated Marketing =
SUMX (
    'Campaign Offering',
    'Campaign Offering'[Weight]
        * CALCULATE (
            SUM ( 'Campaign Costs'[Amount] ),
            REMOVEFILTERS ( Offering ),
            TREATAS ( { 'Campaign Offering'[CampaignKey] }, Campaign[CampaignKey] )
        )
)

Margin after Marketing = [Contribution Margin] - [Allocated Marketing]

The measure iterates the bridge table, which is small: a few hundred rows a year. For each row, CALCULATE finds the total cost of that row's campaign, removing any Offering filter so the whole campaign's cost is found, and TREATAS applies the bridge row's campaign as a filter on the Campaign dimension. Multiplying by the weight gives that offering's share. Because the weights for each campaign add up to one, the allocated amounts add up to the campaign's total at the college level, a check Kwabena wrote into his test plan.

He was careful to label the result as an allocation. Margin after Marketing answers "what if we charged marketing to courses", not "what did the course cost", and its description said so.

Step 5: time intelligence with a calculation group

Rather than writing year to date and prior-year versions of nine measures, Kwabena reused the Time Calculations calculation group from the enrolment model, copied into this model with its five items: Current, YTD, PY, PY YTD and YoY Change, all using the 30 June fiscal year end. Every base measure gained the variations at once. The YoY Change item kept its percentage format string expression. There were no semi-additive measures in this model, so no exclusions were needed.

Step 6: ranking

The top and bottom ten courses by margin per seat used RANKX over the courses the reader had selected.

Ranking courses by margin per seat among the visible courses, blank on totals.
Course Margin Rank =
IF (
    ISINSCOPE ( Offering[Course] ),
    RANKX ( ALLSELECTED ( Offering[Course] ), [Margin per Seat], , DESC, DENSE )
)

Courses with very few seats could rank at the top on margin per seat by chance, so the report page applied a filter to courses with at least twenty seats sold in the period. Kwabena discussed with the director whether that threshold belonged in the measure; they decided it was a reporting choice, so it stayed as a visual filter and was stated on the page.

Step 7: security

The model reused the college's dynamic RLS pattern. A Campus Coordinators role filtered the Campus table with USERPRINCIPALNAME against the registrar's Security Access table; the director and the finance coordinator were not in the role and viewed the model through the workspace as Members of the Continuing Education Analytics workspace, so they saw all campuses. Learner identity never entered the model: CE Registrations held a learner key with no names, which satisfied Philippa without object-level security. Coordinators received the Continuing Education Sales org app, extended with a new Profitability audience.

Step 8: performance

Kwabena removed the ledger's free-text description column, which nobody reported on and which was the largest column in the model, kept only five fiscal years of history, and checked the pages with Performance Analyzer. The Allocated Marketing measure was the slowest, at under a second, because it iterated a small bridge table; he tested a version that iterated Campaign Costs instead and found it much slower, which confirmed the design. Viewing as a coordinator in Desktop, the pages loaded in about two seconds.

Step 9: testing and handover

Before publishing, Kwabena reconciled the model with finance. Net Fees for fiscal 2026 matched the general ledger's Continuing Education revenue within a few hundred dollars, explained by two refunds posted after year end. Instructor Cost matched payroll. Allocated Marketing summed to the marketing budget actually spent. He documented each measure's definition, the allocation method and the twenty-seat threshold in the model's descriptions, and saved the model as a Power BI project in the college's repository so that Rupert's team could review every change.

The first finding surprised the director: several popular courses with full classes made little or no margin, because they ran in the Downtown campus's most expensive rooms. Moving four of them to Lakeshore for the winter term was the first decision the model supported.

Worked problem

Your turn: extend the model

The director asks for a measure showing each subject area's share of total contribution margin, which should still respect the campus slicer. Write it, and say which lesson's technique it uses.

Show solution
  1. The share needs the margin in context divided by the margin for all subject areas.
  2. Remove filters only from the Offering dimension's subject area, so campus and date filters still apply.
  3. All Subjects Margin = CALCULATE ( [Contribution Margin], REMOVEFILTERS ( Offering[Subject Area] ) ).
  4. Subject Margin Share = DIVIDE ( [Contribution Margin], [All Subjects Margin] ), formatted as a percentage.

Answer: Use CALCULATE with REMOVEFILTERS on the subject area column, from the lesson on CALCULATE and filter context, and divide with DIVIDE.

Questions the director asked at the review

When Kwabena presented the model on 20 November, the director and the finance coordinator asked questions that are a good test of any profitability model, and his answers drew on the whole course.

"Why does the course total not equal the sum of the offerings in this table?" It did, for every additive measure; the director was looking at Margin per Seat, a ratio, whose total is the total margin divided by total seats, not the sum of per-offering ratios. Kwabena showed both numbers and explained that the total was the correct weighted value.

"Can I see the same page for last year?" Yes, by choosing PY in the Time Calculation slicer, because every measure on the page was an explicit measure modified by the calculation group.

"Why can the Lakeshore coordinator not see Downtown's numbers?" Because the Campus Coordinators role filtered the Campus table for each signed-in coordinator, and the filter reached every fact table through its relationships. The director, as a workspace Member, was not restricted.

"What happens when we add a new campus room type?" The room charge table from finance would gain a row, the Power Query step would load it, and Room Cost would include it on the next refresh. No measure needed to change.

Worked problem

Your turn: a fixed-cost question

Finance asks for each offering's margin after a share of the unit's fixed administration costs, a single monthly amount, allocated in proportion to each offering's net fees. Sketch the measure.

Show solution
  1. Load the monthly administration cost as its own small fact table at month grain, related to Date.
  2. For the current context, compute the offering's net fees and the unit's total net fees for the same period, removing Offering filters for the total.
  3. Allocated Admin = DIVIDE ( [Net Fees], CALCULATE ( [Net Fees], REMOVEFILTERS ( Offering ) ) ) * [Admin Cost].
  4. Check that Allocated Admin sums to the total administration cost for the period, and label it clearly as an allocation.

Answer: Allocate by net fees share: the offering's share of total net fees, with REMOVEFILTERS on Offering for the denominator, times the period's administration cost, reconciled to the total.

What made the model trustworthy

Looking back at the project, Kwabena listed what had made the director trust the numbers enough to move courses between campuses. The grain of every table was written down. Every measure had a description that said what it included and excluded. The allocation was labelled as an allocation and reconciled to the total spent. Security had been tested in front of the privacy officer. And the model was stored as text with a history of every change. None of those things is difficult on its own. Together, they are what separates a model people use to make decisions from one they use to check someone else's spreadsheet.

Kwabena's last step was a handover note for the Continuing Education team: where the model lived, which sources fed it and when they refreshed, who to ask about access, and which three measures to check first if a number ever looked wrong. The note took an hour to write and meant the model would outlast his own involvement in it.

Common mistakes

  • MistakeLoading all cost sources into one wide table with registrations.

    InsteadGive each business process its own fact table at its own grain, sharing dimensions.

  • MistakeSwitching on bidirectional filtering to allocate campaign costs.

    InsteadUse a bridge table with weights and an explicit allocation measure.

  • MistakePresenting allocated costs as actual costs.

    InsteadName and describe allocation measures clearly, and reconcile allocations to the total spent.

  • MistakePublishing without reconciling to finance.

    InsteadCheck key measures against the general ledger and payroll before anyone relies on them.

Summary and key terms

  • Start from the questions, then choose fact tables and grains for each business process.
  • Flatten descriptive hierarchies into shared dimensions and relate with single-direction one-to-many relationships.
  • Use bridge tables with weights for many-to-many allocations, and keep the allocation logic in a measure.
  • Build explicit, formatted, described base measures; compute ratios as measures.
  • Reuse a calculation group for time variations and RANKX with ISINSCOPE for rankings.
  • Apply dynamic RLS on a dimension and keep personal data out of models that do not need it.
  • Remove unneeded columns, check performance with Performance Analyzer, and reconcile results before release.
Contribution margin
Revenue minus the direct costs of producing it.
Allocation
Sharing a cost that covers several items among them by a chosen rule.
Bridge table
A table with one row per pair of related members, such as campaign and offering.
Reconciliation
Checking model results against an authoritative source, such as the general ledger.
Margin per seat
Contribution margin divided by seats sold.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Why are Instructor Cost and Room Cost written with SUMX?

    Show answer

    Cost is hours times rate on each row, so the product must be computed row by row before adding.

  2. How did Kwabena check the marketing allocation?

    Show answer

    He confirmed that allocated marketing added up to the total campaign spending at the college level.

  3. Why was the twenty-seat threshold a visual filter rather than part of the rank measure?

    Show answer

    It was a reporting choice for one page, not a business definition, so it stayed visible on the page.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz