Case 2: income statement in Power BI
How much did the company earn in a month? You separate income and expenses from the same entries table, subtract them and calculate the profit margin so it is right in the annual total too.
In short: all amounts in Actual are positive; the account type says whether it is income or an expense. CALCULATE([Total Actual], Account[AccountType] = "Income") returns only the income, the same with "Expense" the expenses. Profit is the difference, the profit margin is profit divided by income.
The situation
Management gets a simple income statement every month: income, expenses, profit. [Total Actual] adds all entries together and does not help here, because 200,000 of revenue plus 180,000 of costs are not 380,000 of anything. The matrix shows the months of 2026.
Task 1: income
Task For the 2026 income statement you need income and expenses separately, because [Total Actual] adds both together. Create the measure "Income": [Total Actual], but only for accounts with the account type Income.
Actual 535 rows, 5 columns
| EntryID | Date | CostCenterID | AccountID | Amount |
|---|---|---|---|---|
| 1 | 23 Jan 2025 | 300 | 4000 | 88400 |
| 2 | 22 Jan 2025 | 300 | 4000 | 132600 |
| 3 | 12 Jan 2025 | 200 | 5000 | 36176 |
| 4 | 4 Jan 2025 | 600 | 5000 | 5253.5 |
| 5 | 21 Jan 2025 | 100 | 6000 | 13276.2 |
| 6 | 30 Jan 2025 | 100 | 6000 | 9613.8 |
| 7 | 16 Jan 2025 | 200 | 6000 | 49220 |
| 8 | 20 Jan 2025 | 300 | 6000 | 25440 |
| 9 | 29 Jan 2025 | 400 | 6000 | 12875 |
| 10 | 29 Jan 2025 | 500 | 6000 | 17205 |
| 11 | 10 Jan 2025 | 600 | 6000 | 5045.04 |
| 12 | 14 Jan 2025 | 600 | 6000 | 4656.96 |
Showing the first 12 of 535 rows.
Measures: [Total Actual]
Budget 432 rows, 4 columns
| Date | CostCenterID | AccountID | Amount |
|---|---|---|---|
| 1 Jan 2025 | 300 | 4000 | 221000 |
| 1 Jan 2025 | 200 | 5000 | 32300 |
| 1 Jan 2025 | 600 | 5000 | 5530 |
| 1 Jan 2025 | 100 | 6000 | 21000 |
| 1 Jan 2025 | 200 | 6000 | 46000 |
| 1 Jan 2025 | 300 | 6000 | 24000 |
| 1 Jan 2025 | 400 | 6000 | 12500 |
| 1 Jan 2025 | 500 | 6000 | 15500 |
| 1 Jan 2025 | 600 | 6000 | 9800 |
| 1 Jan 2025 | 100 | 6300 | 4200 |
| 1 Jan 2025 | 200 | 6300 | 7800 |
| 1 Jan 2025 | 600 | 6300 | 3600 |
Showing the first 12 of 432 rows.
Measures: [Total Budget]
CostCenter 6 rows, 3 columns
| CostCenterID | CostCenter | Division |
|---|---|---|
| 100 | Administration | Administration |
| 200 | Production | Operations |
| 300 | Sales | Sales |
| 400 | Marketing | Sales |
| 500 | IT | Administration |
| 600 | Warehouse | Operations |
Account 7 rows, 4 columns
| AccountID | Account | AccountType | AccountGroup |
|---|---|---|---|
| 4000 | Revenue | Income | Revenue |
| 5000 | Materials | Expense | Materials |
| 6000 | Salaries and Wages | Expense | Personnel |
| 6300 | Rent | Expense | Operating |
| 6500 | Travel | Expense | Operating |
| 6800 | Advertising | Expense | Operating |
| 6900 | Other Expenses | Expense | Operating |
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
Showing the first 12 of 730 rows.
CALCULATE adds the account type filter to the month filter that comes from the row. The lesson on filter context shows how they combine. Expenses work the same way, with "Expense" instead of "Income".
Task 2: profit
Task Income and expenses now exist as measures. Create the measure "Profit": income minus expenses, so the profit or loss for the month.
Actual 535 rows, 5 columns
| EntryID | Date | CostCenterID | AccountID | Amount |
|---|---|---|---|---|
| 1 | 23 Jan 2025 | 300 | 4000 | 88400 |
| 2 | 22 Jan 2025 | 300 | 4000 | 132600 |
| 3 | 12 Jan 2025 | 200 | 5000 | 36176 |
| 4 | 4 Jan 2025 | 600 | 5000 | 5253.5 |
| 5 | 21 Jan 2025 | 100 | 6000 | 13276.2 |
| 6 | 30 Jan 2025 | 100 | 6000 | 9613.8 |
| 7 | 16 Jan 2025 | 200 | 6000 | 49220 |
| 8 | 20 Jan 2025 | 300 | 6000 | 25440 |
| 9 | 29 Jan 2025 | 400 | 6000 | 12875 |
| 10 | 29 Jan 2025 | 500 | 6000 | 17205 |
| 11 | 10 Jan 2025 | 600 | 6000 | 5045.04 |
| 12 | 14 Jan 2025 | 600 | 6000 | 4656.96 |
Showing the first 12 of 535 rows.
Measures: [Total Actual], [Income], [Expenses]
Budget 432 rows, 4 columns
| Date | CostCenterID | AccountID | Amount |
|---|---|---|---|
| 1 Jan 2025 | 300 | 4000 | 221000 |
| 1 Jan 2025 | 200 | 5000 | 32300 |
| 1 Jan 2025 | 600 | 5000 | 5530 |
| 1 Jan 2025 | 100 | 6000 | 21000 |
| 1 Jan 2025 | 200 | 6000 | 46000 |
| 1 Jan 2025 | 300 | 6000 | 24000 |
| 1 Jan 2025 | 400 | 6000 | 12500 |
| 1 Jan 2025 | 500 | 6000 | 15500 |
| 1 Jan 2025 | 600 | 6000 | 9800 |
| 1 Jan 2025 | 100 | 6300 | 4200 |
| 1 Jan 2025 | 200 | 6300 | 7800 |
| 1 Jan 2025 | 600 | 6300 | 3600 |
Showing the first 12 of 432 rows.
Measures: [Total Budget]
CostCenter 6 rows, 3 columns
| CostCenterID | CostCenter | Division |
|---|---|---|
| 100 | Administration | Administration |
| 200 | Production | Operations |
| 300 | Sales | Sales |
| 400 | Marketing | Sales |
| 500 | IT | Administration |
| 600 | Warehouse | Operations |
Account 7 rows, 4 columns
| AccountID | Account | AccountType | AccountGroup |
|---|---|---|---|
| 4000 | Revenue | Income | Revenue |
| 5000 | Materials | Expense | Materials |
| 6000 | Salaries and Wages | Expense | Personnel |
| 6300 | Rent | Expense | Operating |
| 6500 | Travel | Expense | Operating |
| 6800 | Advertising | Expense | Operating |
| 6900 | Other Expenses | Expense | Operating |
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
Showing the first 12 of 730 rows.
This exercise is part of Premium.
Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.
See Premium Already Premium? Log in
The first exercise in this lesson is free.
A measure built from two measures is the norm in finance: every building block can be checked on its own, and a later change, a new income account for example, has the same effect everywhere.
Task 3: the profit margin
Task Management wants to know how much of the revenue is left as profit. Create the measure "Profit Margin": profit divided by income, using DIVIDE.
Actual 535 rows, 5 columns
| EntryID | Date | CostCenterID | AccountID | Amount |
|---|---|---|---|---|
| 1 | 23 Jan 2025 | 300 | 4000 | 88400 |
| 2 | 22 Jan 2025 | 300 | 4000 | 132600 |
| 3 | 12 Jan 2025 | 200 | 5000 | 36176 |
| 4 | 4 Jan 2025 | 600 | 5000 | 5253.5 |
| 5 | 21 Jan 2025 | 100 | 6000 | 13276.2 |
| 6 | 30 Jan 2025 | 100 | 6000 | 9613.8 |
| 7 | 16 Jan 2025 | 200 | 6000 | 49220 |
| 8 | 20 Jan 2025 | 300 | 6000 | 25440 |
| 9 | 29 Jan 2025 | 400 | 6000 | 12875 |
| 10 | 29 Jan 2025 | 500 | 6000 | 17205 |
| 11 | 10 Jan 2025 | 600 | 6000 | 5045.04 |
| 12 | 14 Jan 2025 | 600 | 6000 | 4656.96 |
Showing the first 12 of 535 rows.
Measures: [Total Actual], [Income], [Expenses], [Profit]
Budget 432 rows, 4 columns
| Date | CostCenterID | AccountID | Amount |
|---|---|---|---|
| 1 Jan 2025 | 300 | 4000 | 221000 |
| 1 Jan 2025 | 200 | 5000 | 32300 |
| 1 Jan 2025 | 600 | 5000 | 5530 |
| 1 Jan 2025 | 100 | 6000 | 21000 |
| 1 Jan 2025 | 200 | 6000 | 46000 |
| 1 Jan 2025 | 300 | 6000 | 24000 |
| 1 Jan 2025 | 400 | 6000 | 12500 |
| 1 Jan 2025 | 500 | 6000 | 15500 |
| 1 Jan 2025 | 600 | 6000 | 9800 |
| 1 Jan 2025 | 100 | 6300 | 4200 |
| 1 Jan 2025 | 200 | 6300 | 7800 |
| 1 Jan 2025 | 600 | 6300 | 3600 |
Showing the first 12 of 432 rows.
Measures: [Total Budget]
CostCenter 6 rows, 3 columns
| CostCenterID | CostCenter | Division |
|---|---|---|
| 100 | Administration | Administration |
| 200 | Production | Operations |
| 300 | Sales | Sales |
| 400 | Marketing | Sales |
| 500 | IT | Administration |
| 600 | Warehouse | Operations |
Account 7 rows, 4 columns
| AccountID | Account | AccountType | AccountGroup |
|---|---|---|---|
| 4000 | Revenue | Income | Revenue |
| 5000 | Materials | Expense | Materials |
| 6000 | Salaries and Wages | Expense | Personnel |
| 6300 | Rent | Expense | Operating |
| 6500 | Travel | Expense | Operating |
| 6800 | Advertising | Expense | Operating |
| 6900 | Other Expenses | Expense | Operating |
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
Showing the first 12 of 730 rows.
This exercise is part of Premium.
Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.
See Premium Already Premium? Log in
The first exercise in this lesson is free.
With DIVIDE a month without income stays empty instead of showing an error. The total row matters: there the measure divides the annual profit by the annual income and arrives at 20.1%. The average of the twelve monthly percentages would be off, because strong months count more.
Common mistakes
Account type misspelled
The filter value must match the Account table exactly: "Income", not "Incomes". With a typo the measure stays empty in every row without an error message, because no account matches the filter.
Expenses assumed negative
Some systems store expenses with a minus sign. Here all amounts are positive, so [Income] + [Expenses] gives the sum of both instead of the profit.
Margin multiplied by 100
DIVIDE([Profit], [Income]) * 100 gives 20.14 instead of 0.2014. Formatted as a percentage, the cell would then read 2,014%. The format turns 0.2014 into 20.1%.
In real Power BI
- If expenses come from the system with a minus sign, profit is simply
[Total Actual]over all accounts. Which convention applies is usually in the export documentation; check it against a month you know. - An income statement with subtotals (gross profit, operating profit) uses an account group as the matrix row and one measure per level.
Check your result
- Task 1: Income for 2026 totals 3,187,880.80, in October 317,179.20.
- Task 2: Profit for 2026 is 642,177.70; in July only 7,623.80 is left.
- Task 3: The profit margin is 20.1% for the year, 31.4% in October and 3.6% in July.
Back to case 1 or the course overview.