Business Intelligence

BI Analytics
Fundamentals

From raw tables to business insight: a breakdown of data modeling, DAX, SQL, and the KPIs that drive decisions in finance and HR.

Power BI DAX SQL Star Schema Analytics
8 min read

Business Intelligence has become one of those terms that means everything and nothing at the same time. Ask ten people and you'll get ten answers: dashboards, data warehouses, SQL, "turning data into decisions." All partially right. None complete.

This guide builds the picture from the ground up. From the data model that makes analytics possible, through the language that powers Power BI measures, to the domain KPIs that actually answer business questions. By the end, you'll have a clear mental map of how the BI stack fits together, and where each piece matters most.

Foundation

Star Schema: the structure that makes BI fast

Before any DAX measure or SQL query can work correctly, the data model has to be right. Most BI performance problems (slow reports, wrong totals, measures that behave unexpectedly) trace back to a poorly designed model. Get the model right and everything else becomes easier.

The dominant pattern in BI is the Star Schema. It organises data into two types of tables:

Fact Table
Records events and transactions. Contains numeric measures (revenue, quantity, cost) and foreign keys linking to every dimension. Typically the largest table in the model.
Dimension Table
Describes the context of each fact. Date, Product, Customer, Region, Employee. Contains the attributes you filter and group by in reports, the nouns of your data model.
The Grain
The finest level of detail stored in the fact table. "One row per invoice line." Defining the grain first prevents modeling errors that are expensive to fix after the model is built.

The "star" shape emerges naturally: the fact table sits at the centre, with dimension tables radiating outward. Each foreign key in the fact table connects to the primary key of one dimension. A sales fact table might have keys to Date, Customer, Product, and Region, four dimension tables, four points of the star.

The alternative is Snowflake Schema, where dimensions are normalised into sub-dimensions. It saves storage but forces Power BI to perform more joins, slows down queries, and makes DAX significantly more complex to write. For most BI workloads, Star Schema beats Snowflake. The trade-off of slightly more storage for dramatically simpler measures and faster performance is almost always worth it.

The most common modeling mistake: mixing facts from different grains in the same table. If your fact table has one row per invoice but you try to add one row per monthly target, you've mixed two grains. Split them into separate fact tables and build a model that can relate them correctly.
Power BI

DAX: the measure language you need to understand

DAX (Data Analysis Expressions) is the formula language of Power BI, Analysis Services, and Excel's Power Pivot. It looks like Excel formulas but operates on tables and columns, not cells. Understanding one concept separates beginners from practitioners:

01
Filter Context
Every DAX measure executes inside a filter context, the set of filters applied by row labels, column headers, slicers, and report filters. The same measure returns different values depending on where it's placed. Understanding this is 80% of DAX.
02
CALCULATE()
The most important function in DAX. It evaluates an expression in a modified filter context. Every advanced measure (year-over-year growth, % of total, rolling averages) uses CALCULATE to add, remove, or override filters before computing a result.
03
Time Intelligence
TOTALYTD, DATEADD, SAMEPERIODLASTYEAR. Power BI's built-in time functions require a proper date dimension table with no gaps: continuous dates from the earliest to the latest date in your data, marked as a date table.

Beyond those three, the patterns that appear in almost every production BI solution are:

  • Measures vs calculated columns: Measures are computed at query time using the current filter context. Calculated columns are computed at refresh time and stored in the model. Use measures for aggregations, calculated columns only when you need a value to filter or group by.
  • DIVIDE() instead of the / operator: handles divide-by-zero gracefully, returning a blank (or a specified alternative) instead of crashing the visual.
  • VAR / RETURN: store intermediate results to avoid recalculating the same expression multiple times in a complex measure. Improves both readability and performance.
  • ALL() and ALLEXCEPT(): remove filters from the context, used inside CALCULATE to compute totals, percentages, or rankings that ignore slicers.
The single biggest productivity jump in Power BI development: learn to read the filter context before writing the measure. Ask yourself: "what filters are active when this measure evaluates?" Then write CALCULATE to adjust that context as needed.
SQL

SQL patterns every BI analyst uses

SQL is the language of the data warehouse, the layer where raw source data is transformed into clean, modeled tables that Power BI can query. Beyond basic SELECT/WHERE/GROUP BY, BI analytics relies heavily on a specific set of patterns.

Window Functions
ROW_NUMBER, RANK, LAG, LEAD, SUM OVER PARTITION BY. Allow calculations across rows without collapsing results. Essential for running totals, period-over-period comparisons, and ranking within groups, operations that GROUP BY alone cannot do.
CTEs
WITH clause Common Table Expressions. Break complex queries into named, readable steps instead of deeply nested subqueries. Each CTE can reference previous ones; the result is SQL that reads like a step-by-step story of how the data is transformed.
JOIN types
INNER (only matching rows), LEFT (all left rows, nulls for non-matches on right), FULL OUTER (all rows from both). The most misused: LEFT JOIN followed by WHERE right_table.id IS NOT NULL, which is identical to INNER JOIN but harder to read and occasionally slower.
Data Quality
COUNT(*) vs COUNT(column) to detect nulls. CASE WHEN to flag anomalies. Self-joins to find duplicates. GROUP BY with HAVING COUNT(*) > 1 to surface duplicate keys. Running these checks before building the model saves hours of debugging later.

One pattern worth highlighting in detail: the period-over-period comparison. In SQL, this means joining a table to itself (or using LAG with a window function) to get the previous period's value in the same row as the current period's value, so you can compute the difference in a single SELECT.

Domain Knowledge

The KPIs that business stakeholders actually ask for

Technical BI skills without domain knowledge produce dashboards nobody uses. The metrics that appear on executive reports and board packs follow recognisable patterns across most industries. Finance and HR are the two most common domains for BI analysts, and each has its own vocabulary.

Finance KPIs
P&L and FP&A Metrics
Revenue, Gross Profit, EBITDA, Operating Margin. Budget vs Actual variance (absolute and %). Forecast Accuracy (how close the forecast was to actual outcome). Cash Conversion Cycle. These are the numbers that appear in every board pack, every month, in every company.
HR / People Analytics
Workforce Metrics
Headcount (active employees at a point in time). Turnover Rate (leavers / average headcount). Time-to-Fill (days from job opening to accepted offer). eNPS (Employee Net Promoter Score). Absenteeism Rate. FTE planning (full-time equivalents, accounting for part-time and contractors).

The most common mistake in finance dashboards: confusing Budget vs Actual with Forecast vs Actual. Budget is fixed at the start of the year and measures against the original plan. Forecast updates throughout the year and reflects the best current estimate of where the year will end. A good FP&A dashboard tracks both: the budget variance tells you where you are vs. the plan; the forecast tells you where you're going.

In HR analytics, headcount sounds simple but has three valid definitions: point-in-time (employees active on a specific date), average (mean headcount over a period), and FTE-adjusted (weighted for part-time). When stakeholders say "headcount," always clarify which definition they mean before building the measure.

Architecture

The modern BI stack: where the data goes before Power BI

Power BI is the last mile, the visualisation layer that executives interact with. Behind it is a stack that ingests, stores, and transforms data before it ever reaches a dashboard. Understanding the stack helps you debug problems, communicate with data engineers, and design solutions that scale.

Source Systems
ERP, CRM, HRMS, APIs
Ingestion
Extract & Load (EL)
Data Warehouse
Raw → Staging → Marts
Semantic Model
Star Schema + DAX
Power BI
Reports & Dashboards

The data warehouse is typically organised in layers: a raw layer that stores source data exactly as received, a staging layer where data is cleaned and standardised, and a mart layer where domain-specific star schemas live: the Finance mart, the HR mart, the Sales mart. Power BI connects to the mart layer.

The transformation layer (the SQL logic that moves data from raw to mart) is increasingly built with dbt (data build tool), which lets you write SQL transformations as version-controlled, tested, documented models. On the cloud side, the common combinations are Snowflake + dbt + Fivetran, or Azure Synapse + Power BI in a Microsoft-native stack.

As a BI analyst, you don't need to build the ingestion pipeline, but you need to know it exists, understand how data arrives in the warehouse, and be able to trace a wrong number backwards through the layers to find where it went wrong.

View on GitHub Source code and data for this reference guide

More articles

Breakdowns of finance, data, and the systems behind them.