Power BI for Practitioners
Build Honest Dashboards from Real South Asian Data
A practical course for building dashboards from the survey data you already use. Each of the eight modules covers one part of the workflow and ends with a lab you do yourself in Power BI. The examples are NFHS, ASER and World Bank data, and the course is straight about where the free version stops and what live sharing costs.
What this course covers
The companion Data Visualisation course lays out a tool ladder, from spreadsheets through Datawrapper and Flourish to Power BI and Tableau, then code. This course is that rung in full: everything you need to take Power BI from install to a shared dashboard, with the development-sector cases the generic tutorials skip.
Coaches alternate by module: Varna on the odd numbers, Vandana Soni on the even. Every module carries learning objectives, worked teaching excerpts, two coach callouts, a lab, a common-mistakes list, an applied challenge with a worked answer, five self-check questions, and resources.
Most Power BI tutorials teach corporate sales data. Your work is not corporate sales data.
The mechanics are the same whoever you work for. What's usually missing for development work is the part the tutorials skip: cleaning a messy NFHS factsheet, knowing when a map of counts misleads, what it costs to share a live report, and what the DPDP Act lets you publish.
Real regional data
Labs use National Family Health Survey, ASER education data, and World Bank indicators. You build the dashboards you would actually need.
Honest about free
Building is free. We say plainly where the paid wall sits, what live sharing costs per person, and which free routes carry hidden privacy risk.
Privacy and the law
India's Digital Personal Data Protection Act, 2023 shapes what you may publish. We build that floor into the workflow, not bolt it on at the end.
I built dashboards for years before anyone explained a star schema to me, so I made the usual mistakes — flat tables, numbers hard-coded into formulas, a map of counts that pointed a funder at the wrong districts. This is the course I needed then. It explains why each step matters, and it is clear about the point where the tool stops being free. Keep one of your own datasets open while you read, and do each lab on it.
Eight modules, each with a lab
Work through them in order; each one builds on the last. Keep a dataset of your own open alongside the labs.
Getting Power BI Free
Two things decide whether Power BI will work for you before you build anything: the authoring tool is free, and it runs only on Windows. Both matter more for a practitioner in Dhaka or Bhopal than for someone with an IT-issued corporate laptop. This module gets you installed and oriented, and sets out the trade-offs.
- Install Power BI Desktop for free and explain what it does that the cloud and mobile apps do not
- Pick a realistic route to author on a Mac or Linux machine, with the costs named
- Navigate the five regions of the interface and the six ribbon tabs
- Describe exactly what a .pbix file bundles, and why that makes your analysis portable
Three things people call “Power BI”
The single word covers three separate products. Confusing them is the first thing that trips people up, especially around what costs money.
Power BI Desktop
The authoring application. You connect to data, clean it, build the model, write calculations, and design reports here. Free, Windows-only, and where Modules 1 to 7 live.
Power BI Service
The cloud at app.powerbi.com. You publish finished reports here to share them. Sharing is where the paid licence starts. Covered in Module 8.
Power BI Mobile
Apps for viewing published reports on a phone or tablet. A consumption surface, not an authoring one.
Power BI Desktop is free to download and use, with no time limit and no feature lock on the modelling engine. You can connect to over a hundred sources, build a full star schema, write any DAX, design unlimited report pages, and export to PDF or PowerPoint without paying. The cost appears only when you publish to the cloud to share live, which needs a Pro licence at 14 US dollars per user per month as of 2026 (Microsoft Power BI pricing). Everything taught in Modules 1 to 7 costs nothing.
The Windows question, answered straight
Power BI Desktop is a Windows-only application. Microsoft has not shipped a macOS or Linux build and has signalled no near-term plan to. If you are on a Mac or Linux machine you have three realistic routes, in rough order of friction.
| Route | What it is | Cost | The honest catch |
|---|---|---|---|
| Service in a browser | app.powerbi.com works in Safari, Chrome, Firefox on any OS | Free tier | Viewing and light edits only. No full Power Query, no custom connectors. Not real authoring. |
| Windows in a VM | Run Windows 11 inside your Mac via Parallels (Apple Silicon) or VMware Fusion | Parallels ~99 USD/yr; Fusion free for personal use | You still need a Windows licence and disk space. Performs well on M-series chips. |
| Cloud Windows desktop | A Windows VM on Azure, AWS or a free-tier cloud, accessed remotely | Hourly compute | Recurring cost, needs decent bandwidth. Fine for occasional heavy work. |
Sort out the Mac question before you train a whole team, not after. For mixed teams the usual answer is a few people authoring on Windows or in a VM, and everyone else viewing in the browser. I have watched a rollout stall because half the team could not open the tool and no one had planned for it. If you are buying a machine mainly for data work, a Windows laptop avoids the problem.
Install it
On Windows this is about ten minutes. Do it now if you can; the rest of the course assumes you can follow along.
- Go to
powerbi.microsoft.com/desktop, or search Power BI Desktop in the Microsoft Store. The Store version self-updates, which is the easier path. - Run the installer. It needs 64-bit Windows 10 or 11. There is no 32-bit build any more.
- Open it and sign in. A work or school email unlocks publishing later; a personal address still lets you build and save locally. No paid account is needed to start.
- Close the splash screen. You are looking at a blank report canvas. This is where everything happens.
The five regions of the screen
The interface looks busy. It is five regions, and you use all of them in every project.
The three small icons on the far left switch Report, Data and Model views. Fields pane lists every loaded table and column; Visualizations pane sits beside it; the ribbon runs along the top.
The six ribbon tabs, briefly, so the names stop being mysterious:
- Home holds Get Data and Refresh, the two buttons you press most, plus Transform Data and Publish.
- Insert adds visuals, text boxes, shapes and buttons to a page.
- Modeling is where you write measures and calculated columns, manage relationships, and create roles for security.
- View controls page layout, gridlines, themes and the mobile layout.
- Optimize helps when a slow report needs tuning. You will ignore it for a while.
- Help is the documentation and the community.
Open Desktop. Click Home > Get Data > Text/CSV and pick any small spreadsheet you have. A preview window appears. Click Transform Data (not Load) and the Power Query Editor opens; you will live here in Module 3. For now, click Close & Apply on the Home ribbon. The data loads, and its table appears in the Fields pane on the right. Click the Data view icon on the left to see the actual rows, then the Report view icon to return. Drag a text column onto the blank canvas and Power BI guesses a visual. That loop is the whole workflow: get data, clean, load, look, build.
What a .pbix file holds
When you save, you get one file with a .pbix extension. It can bundle three things together: the queries that fetch and clean your data, the data model with its calculations, and the report pages with their visuals.
That portability is the point. You can email a .pbix and the recipient has your entire analysis, queries and all, provided they also run Windows. A small NFHS extract might produce a file of a few megabytes; a large model with imported data can run to hundreds.
Treat the .pbix as a working file, not an archive. The spreadsheet habit is one giant file that does everything; don't carry it over. One file per question, or per dashboard, keeps refreshes fast and makes it clear to whoever comes next what each file is for. A 60 MB file with eleven hidden report pages is just inherited confusion. Name files for the question they answer, not the date you last touched them.
- Assuming a Mac can run Desktop natively
- It cannot. Plan the VM or browser route before committing a team, or you train people who cannot open the tool.
- Signing up for a paid trial to ‘unlock’ building
- Building is already free. The trial only matters for publishing and sharing, which is Module 8.
- One enormous .pbix for everything
- Split by question. Large all-purpose files refresh slowly and become unmaintainable.
Plan a small rollout. Your team is six people: two on Windows, four on Macs. Three need to build dashboards, three only need to view them. Sketch the cheapest workable setup.
Show a worked answer
The three builders need full authoring. Put the two Windows users on native Desktop. One Mac builder runs Windows in a VM (Parallels on Apple Silicon, or VMware Fusion free). The three view-only people use the Service in a browser, which is free to view shared content, though sharing itself will need at least one Pro licence (Module 8). Net new cost so far: one VM licence, plus Pro seats decided later by how you share. Nobody is blocked from starting today.
- What machines does your team actually use? If a third are Macs, what is your honest plan for them?
- Name two reports you re-paste by hand in Excel every month. Those are your first Power BI candidates.
- How many people need to view a finished dashboard? That number drives the licence cost in Module 8.
Resources
Get Data
Getting the data in is the first step, and a few small choices here save hours later. This module covers how raw data comes into Power BI through Get Data. We use a National Family Health Survey extract, because survey data is what most South Asian practitioners work with.
- Connect to Excel, CSV and web sources through Get Data
- Set the encoding and delimiter so Indian-language data reads correctly
- Choose Transform Data over Load, and say why in terms of reproducibility
- Pull an NFHS-5 indicator table in and recognise what Power BI guessed about it
Get Data is one button, then a Navigator
Everything starts at Home > Get Data. Power BI ships with well over a hundred connectors; you will use a handful. After you pick a source you meet the Navigator, which previews what is inside before you commit.
The Navigator after choosing an Excel workbook. Prefer a named table (the grid icon) over a raw sheet, which drags in stray title rows and notes.
Two paths from every source: Load and Transform Data
After you point at a file you get two buttons. Load drops the data into the model as-is. Transform Data opens the Power Query Editor first, so you clean before loading. The instinct is to Load and get to the charts. Almost always, click Transform Data. Survey exports are never clean enough to use raw, and the cleaning steps you record become a repeatable recipe. This is the reproducibility principle that any empirical researcher already knows: the value is not only the cleaned dataset, it is the documented, re-runnable path from raw to clean.
Clean in Transform Data before you load, not after. I have watched people lose an afternoon because they clicked Load, built half a dashboard, then found a column had come in as text and every total was wrong. Going back means unpicking finished visuals. Power Query is also where you write down how the data was prepared, so that six months later you, an auditor, or a sceptical funder can see exactly what was done to the numbers. Treat it as your methods section.
CSV: the encoding trap
Comma-separated files are the common currency of open-data portals like data.gov.in. Two settings in the preview decide whether the file reads correctly.
- File Origin / encoding. Set this to
65001: Unicode (UTF-8). If district names in Hindi, Bangla or Tamil arrive as garbled boxes, a wrong encoding is almost always why. - Delimiter. Usually a comma, but Indian government files sometimes use tabs or semicolons. The preview shows instantly if columns are not splitting.
Excel and Web
For a workbook, prefer a named table (small grid icon in the Navigator) over a worksheet. A sheet drags in title rows, merged cells and blank columns you then strip out. For the web, Get Data > Web takes a URL and finds the tables on a page or behind an API. The World Bank exposes indicators through a documented API; you can also point at a CSV on a public portal so a refresh re-pulls the current file instead of you downloading it by hand each quarter. When a source supports it, Power Query pushes filters back to the source (query folding), so you pull only the rows you need rather than everything.
Prepare a CSV with columns State, District, Indicator, Value, Round. Home > Get Data > Text/CSV, choose the file. In the preview, set File Origin to 65001: Unicode (UTF-8) and confirm the comma is splitting columns. Click Transform Data. The Power Query Editor opens with an Applied Steps list already holding Source and Changed Type: Power BI has guessed your types. Those guesses are exactly what Module 3 teaches you to check, because a Value column guessed as text will silently refuse to sum.
On the data. Lab tables in this course are illustrative samples for teaching the mechanics; you swap in real figures. For reference, genuine NFHS-5 national values (IIPS and ICF, 2019-21) include stunting among under-fives at about 35.5 percent, anaemia among women aged 15 to 49 at about 57 percent, and institutional births at 88.6 percent. Verify any district figure against the official factsheet before it reaches a report.
| State | District | Indicator | Value | Round |
|---|---|---|---|---|
| Bihar | Araria | Stunting (under-5) % | 42.1 | NFHS-5 |
| Bihar | Patna | Stunting (under-5) % | 31.4 | NFHS-5 |
| Odisha | Koraput | Anaemia, women 15-49 % | 61.2 | NFHS-5 |
| Odisha | Khordha | Anaemia, women 15-49 % | 54.0 | NFHS-5 |
The moment a file contains anything that identifies a person, a name, a phone number, a household location, you have left the world of harmless aggregates. The door is the right place to decide this, not after it is buried in the model. If district aggregates answer your question, do not load the individual records at all. Module 8 covers the law; the habit starts here.
- Clicking Load to save time
- You skip the recorded recipe and often discover a type error after building visuals. Transform first.
- Leaving encoding on the default
- Non-Latin scripts garble. Set UTF-8 (65001) at the preview.
- Connecting to a busy worksheet instead of a named table
- You inherit title rows and blank columns. Pick the table object.
- Loading personal records when aggregates would do
- Minimise at the door. What you never load cannot leak.
Spot the broken load. A colleague's NFHS dashboard shows every district's stunting rate as blank, and the state names display as square boxes. Two settings were wrong at import. Name them and the fix.
Show a worked answer
First, the Value column was loaded as text, not a decimal number, so it will not aggregate and the measures return blank. Fix it in Power Query by setting the column type to Decimal Number (Module 3). Second, the file was read in the wrong encoding, garbling the Devanagari or Bangla names; re-import with File Origin set to UTF-8 (65001). Both are door-stage decisions, which is why this module insists on Transform Data before Load.
- Which routine source could be a Web connection that refreshes itself rather than a monthly manual download?
- Open one survey export. How many of its columns would a dashboard actually use? The gap is your cleaning workload.
- Does any file you plan to load contain personal data? Write down now where it will and will not be allowed to go.
Resources
Power Query
Power Query is where most of the work in a Power BI project happens: cleaning the data. It records your cleaning as a sequence of steps, so a messy survey export becomes a tidy table and every change you made is written down and re-runnable. If you care how a number was produced, this is the part to get right.
- Read the Applied Steps list as an audit trail you can edit and reorder
- Apply the core transforms: promote headers, set types, filter, trim, replace, split
- Unpivot a wide survey factsheet into the long shape charts expect
- Merge tables by a key and append rounds into one table, and tell the two apart
The Applied Steps list is an audit trail
When you click Transform Data, the Power Query Editor opens. On the right is the Applied Steps panel. Every action adds a line; click any step to see the table as it stood at that point, edit it, reorder, or delete. Underneath, each step is a line of the M language, visible in the Advanced Editor. For an empirical researcher this is a reproducible data-preparation script that you build by clicking and that documents itself.
The Power Query Editor: data preview on the left, the editable Applied Steps audit trail on the right. Click any step to time-travel to that point in the cleaning.
The cleaning moves you use weekly
Promote headers
Turn the first row of values into column names. Government exports often carry a title row above the real header, so remove the top rows first, then promote.
Change type
Tell Power BI that Value is a decimal, Round is text, Year is a whole number. Wrong types are the most common cause of broken totals. Check the type icon in each column header.
Remove and choose columns
Keep only what the dashboard needs. A leaner table refreshes faster and is easier to reason about.
Filter rows
Drop blanks, footnotes, or a “Total” row that would double-count if it reached a chart.
Replace, Trim, Clean
Turn “N/A” into null; strip stray spaces so “Bihar ” and “Bihar” stop looking like two states. Clean removes non-printing characters.
Split column
Break “Bihar - Araria” into State and District by a delimiter, so each lives in its own column.
Unpivot: the move that fixes survey data
This is the single most useful transformation for development work, and the one people miss. Survey factsheets come wide: one row per district, a separate column for every indicator. That layout is unusable for charting because Power BI wants one row per observation. The principle has a name: Hadley Wickham’s tidy data (Journal of Statistical Software, 59(10), 2014), where each variable is a column and each observation a row. Unpivot turns wide into tidy.
Select the district column, right-click, Unpivot Other Columns. The indicator names collapse into a single Attribute column (rename it Indicator) and the numbers into a single Value column. Now one slicer can switch the whole dashboard between indicators. Underneath, Power Query has written a single line of M, Table.UnpivotOtherColumns, that re-runs on every refresh:
let
Source = Csv.Document(File.Contents("aser.csv"), [Encoding=65001]),
Headers = Table.PromoteHeaders(Source),
Typed = Table.TransformColumnTypes(Headers, {{"District", type text}}),
Long = Table.UnpivotOtherColumns(Typed, {{"District"}}, "Indicator", "Value")
in
Long
The recorded query. You did not write this; clicking generated it. But you can read and edit it, which is the reproducibility payoff.
Use Unpivot Other Columns, not Unpivot Columns. The difference bites when next year's file adds an indicator. If you unpivoted the specific columns you saw this year, the new one is silently ignored. If you unpivoted everything except the district key, the new indicator flows in automatically. Build for the data you will get, not only the data in front of you. It is the same discipline as not hard-coding the number of columns in a script.
Merge and Append: joining tables
Two operations combine tables, and people confuse them.
- Merge is a join. It brings columns from one query into another by matching a key, the way you add a region label to each district by matching district codes. Power Query supports the join types you already know from relational data: left outer, inner, full outer, and the anti-joins for finding non-matches.
- Append is a union. It stacks rows. Use it to combine the NFHS-4 file and the NFHS-5 file into one long table with a Round column, so you can chart change across rounds.
ASER, the Annual Status of Education Report run by Pratham, produces exactly this kind of real, slightly messy data: a title row, mixed types, a wide layout. Use an ASER-style sample to practise the full sequence.
- Home > Remove Rows > Remove Top Rows to drop any title rows above the real header.
- Home > Use First Row as Headers to promote the header.
- Click each column's type icon: Value columns to Decimal Number, District to Text. Watch the Changed Type step appear.
- Select the District column, right-click > Unpivot Other Columns. Rename Attribute to
Indicator. - Transform > Format > Trim, then Clean, on District and Indicator to kill stray spaces.
- Home > Replace Values to turn
NAinto null so it counts as missing, not text. - Rename the query to
aser_long. Home > Close & Apply to load the cleaned table.
ASER reports reading and arithmetic levels for rural children, gathered by Pratham volunteers across hundreds of districts. The wide-to-long reshape you just did is what you would need before charting, say, the share of Standard 3 children who can read a Standard 2 text, district by district.
Applied Steps is your methods section. When a funder asks how you cleaned a dataset, the honest answer is usually a shrug and a half-remembered set of Excel edits. Here it is a list anyone can read and re-run. Name your queries and your steps so the next person, or you in a year, can follow the logic without a phone call. Reproducibility is not a luxury in our sector; it is what separates a defensible number from a rumour.
- Leaving a numeric column typed as text
- It will not sum or average; measures return blank. Set the type explicitly.
- Unpivoting named columns instead of Other Columns
- New indicators next year get dropped silently. Unpivot everything but the key.
- Forgetting to Trim keys
- ‘Bihar ’ and ‘Bihar’ split into two categories and relationships fail to match later.
- Confusing Merge with Append
- Merge adds columns by a key; Append stacks rows. Combining two survey rounds is an Append.
Reshape and reason. You have an NFHS file with one row per district and twelve indicator columns, plus a separate small file mapping each district to its NITI Aayog aspirational-district status. Describe the two Power Query operations that get you to a single long table you can slice by aspirational status.
Show a worked answer
First, Unpivot Other Columns on the district key in the NFHS file, collapsing the twelve indicator columns into Indicator and Value, giving one row per district-indicator pair. Second, Merge that long table with the aspirational-district lookup on the district key (a left outer join keeps every NFHS row and adds the status column). You now have District, Indicator, Value and Aspirational-status in one table, so a single slicer can compare aspirational against other districts across any indicator. Note the order: unpivot first keeps the merge simple, one key, one added column.
- Take one survey file. Is it wide or long? If wide, how many indicator columns collapse into one Indicator field after unpivoting?
- Where do you currently make undocumented manual edits in Excel? Each belongs in Applied Steps instead.
- If a funder asked you to show exactly how you cleaned a dataset, could you today? Power Query is how that becomes yes.
Resources
Data Modelling
A model is how your tables relate to each other. When it is set up well, charts, filters and calculations all behave. When it is one giant flat table instead, you end up fighting the tool. This module covers how to structure the data — ideas that predate Power BI and apply well beyond it.
- Explain why a single flat table breaks slicing, counting and trust
- Build a star schema with a fact table and dimension tables, and name the grain
- Create relationships with the right cardinality and cross-filter direction
- Build and mark a dedicated date table for reliable time calculations
Why one flat table fails
The spreadsheet habit is one wide sheet: district, state, region, scheme, year, indicator, value, all on every row. It works until you slice. Region names repeat thousands of times, so a single typo invents a phantom region. Distinct counts get awkward. Filters behave unpredictably. This is not a Power BI quirk; it is the redundancy problem that Edgar Codd’s relational model (1970) and database normalisation were designed to solve. The Power BI answer is a particular, deliberately denormalised shape: the star schema.
Fact and dimension tables
The star schema comes from Ralph Kimball’s dimensional modelling (The Data Warehouse Toolkit). It splits data into two kinds of table.
Fact table
The events or measurements, one row per observation. The numbers you aggregate live here: the indicator value, beneficiaries reached, budget spent. It holds keys that point out to the dimensions. Its grain, the meaning of one row, is the first thing to pin down.
Dimension tables
The descriptive context, each item listed once. A District table with one row per district and its state and region. A Date table. A Scheme table. You slice and group by these.
The shape is a star: the fact table in the centre, dimensions around it, each joined by a key. A District dimension of 707 rows joins to a fact table of hundreds of thousands through a district code.
Relationships and cardinality
In Model view you drag a key from one table to the matching key in another to make a relationship. Power BI infers the cardinality, usually one-to-many: one row in the District dimension to many rows in the fact table. The cross-filter direction is normally single, so filtering District filters the facts, the natural flow. Resist setting everything to bidirectional; it creates ambiguous filter paths and slows the model. Turn it on only for a specific need you can name.
Model view. Drag district_id from the dimension to the fact to form a one-to-many relationship. The 1 and asterisk on the line show cardinality.
The date table you should always make
Time calculations, year-on-year change, comparisons across survey rounds, work reliably only against a dedicated Date table with one continuous row per period, marked as a date table under Modeling. Relying on a date column buried in the fact table will eventually fail. Build the Date table once, mark it, relate it, and the time intelligence in Module 5 simply works.
Start from the aser_long or NFHS long table from Module 3. In Power Query, reference it to create a District dimension: keep only District and State, then Home > Remove Duplicates so each district appears once. Close & Apply. In Model view, drag District from the fact onto District in the new dimension; confirm the line reads one-to-many, dimension to fact, single direction. Back in Report view, put State on a slicer and the value on a bar chart. The slicer now filters cleanly because it lives in a dimension, not repeated down a flat table.
The hardest habit to break is the love of the single master sheet; it feels safe to see everything in one place. But the model isn't for reading data; it is the set of relationships the engine uses to answer questions. When I coach teams I ask them to say each table's job out loud: ‘this one is facts, these are the things I slice by.’ If a table is doing both jobs, it usually needs splitting. Once the star clicks, people stop fighting their filters and start trusting them.
Pin down the grain before you build anything: what does one row of your fact table mean? One district-indicator-round? One household visit? One disbursement? If you cannot say it in a sentence, the model is not ready, and no amount of clever DAX later will rescue an unclear grain. This is the discipline Kimball insists on, and it is the cheapest hour you will spend on a dashboard.
- One flat table for everything
- Repeated context invites typos and breaks distinct counts. Split into fact and dimensions.
- Bidirectional cross-filter everywhere
- Ambiguous filter paths and slow models. Keep single direction unless a named need forces otherwise.
- No dedicated date table
- Time intelligence misbehaves. Build one, mark it, relate it.
- Relationship will not form
- Usually a type mismatch or un-trimmed key. Fix the type and Trim in Power Query first.
Find the grain. A programme tracks monthly disbursements to self-help groups across districts, and wants a dashboard of total disbursed by district and by month, plus a count of distinct groups paid. Describe the fact table grain and the dimensions you would build.
Show a worked answer
The natural grain is one row per disbursement (group, date, amount), which lets you sum amounts and count distinct groups cleanly. The fact table holds group_id, date, district_id and amount. Build three dimensions: a District table (district_id, state, region), a Date table (one row per day, marked as date table, carrying month and year), and a Group table (group_id, formation year, block). Total disbursed is SUM over the fact; distinct groups paid is DISTINCTCOUNT(group_id); by-month and by-district come free from the dimensions. A flat monthly summary table would block the distinct-group count, which is why grain comes first.
- Sketch your data as a star: what is the fact, what are the things you slice by? If you cannot tell which is which, that is the work.
- Do you have a real date dimension, or a date stuck in the fact table? Plan to build a proper one.
- Which label in your spreadsheet repeats on thousands of rows? That is a dimension waiting to be pulled out.
Resources
DAX Foundations
DAX is the formula language that turns loaded data into answers. It looks like Excel formulas but works differently. The thing to understand first is the difference between a calculated column and a measure; most of the rest builds on it. Underneath sits filter context, the subject of Alberto Ferrari and Marco Russo's reference, The Definitive Guide to DAX.
- Decide correctly between a calculated column and a measure
- Write aggregate measures with SUM, AVERAGE, COUNTROWS and DISTINCTCOUNT
- Use DIVIDE for safe division and CALCULATE to change filter context
- Build a change-over-rounds measure using variables and a date table
Calculated column versus measure
Both are written in DAX; they behave completely differently.
Calculated column
Computed row by row when data refreshes, then stored in the table. It sees one row at a time (row context). Use sparingly: it costs memory and is usually wrong for aggregates. Good for a flag that classifies each district.
Measure
Computed on demand when a visual asks, against whatever filters are active (filter context). Nothing is stored. This is what you want for totals, averages, rates and shares. Almost every number on a dashboard should be a measure.
The deciding question: does the number change when you click a slicer? A district's name does not change when you filter, so it can be a column. A stunting rate recomputes for whatever districts are selected, so it must be a measure.
The handful of functions that do most of the work
SUM,AVERAGE,MIN,MAX: aggregates over a column.COUNTROWS,DISTINCTCOUNT: count rows, count distinct values (how many districts reported).DIVIDE: safe division.DIVIDE(a, b)returns blank instead of an error when b is zero. Use it instead of the slash, always.CALCULATE: the most important function in DAX. It evaluates a measure while changing the filter context. This is how you build any comparison.FILTER: returns a filtered table, used inside CALCULATE for conditions a simple equals cannot express.
Your first measure
A rate is a sum over a sum. Write it as a measure so it recomputes for any selection.
The measure editor with the formula bar and IntelliSense. Measures live in the model, in the Fields pane, not inside a single visual.
Stunting Rate =
DIVIDE(
SUM( fact[children_stunted] ),
SUM( fact[children_measured] )
)
Because it is a measure, this returns the right rate whether the visual shows one district, one state, or the whole country.
CALCULATE: changing the question
CALCULATE takes a measure and a set of filters and evaluates the measure as if those filters applied. It is how comparisons get built.
Stunting, Bihar =
CALCULATE( [Stunting Rate], dim_district[state] = "Bihar" )
CALCULATE re-evaluates the existing Stunting Rate but forces the state filter to Bihar, whatever the visual otherwise shows.
Time intelligence needs that date table
Comparisons across rounds or years rely on the dedicated date or round table from Module 4. With it in place, change computes cleanly. Variables (VAR) make multi-step DAX legible, which matters when someone else, or future you, reads it.
Change vs NFHS-4 =
VAR current = [Stunting Rate]
VAR prior = CALCULATE( [Stunting Rate], dim_round[name] = "NFHS-4" )
RETURN current - prior
VAR captures the current rate and the NFHS-4 rate, then RETURN gives the difference. Readable DAX is maintainable DAX.
Why DIVIDE, always
Name measures the way you would name a variable in a methods section, so a stranger knows what they compute. Stunting Rate is good; Measure 1 is how dashboards become unmaintainable. And reach for DIVIDE every time you divide. I have seen a published district dashboard show a blank where a rate should be, because one district had zero children measured and a plain division threw an error that propagated across the visual. DIVIDE returns a clean blank and the rest survives. Small habit, real consequence.
Put Stunting Rate in a card and it shows the national rate, because no district filter is active, so the filter context is ‘everything’. Drop the same measure into a bar chart with District on the axis, and each bar shows that district's rate, because each bar's filter context is that one district. You wrote one measure; the visual decided the filter context. That is the whole of DAX in a sentence: a measure is an instruction, and the filter context at the moment of evaluation decides what it returns. Add a State slicer and click Bihar, and both the card and the bars recompute, because the slicer narrowed the context. Nothing was recalculated and stored; it was all computed on demand.
Build the measures the dashboard will reuse. Measures live in the model, so build once and use everywhere.
- In Report view, right-click your fact table in the Fields pane > New measure.
- Write the
Stunting Ratemeasure using DIVIDE. Press enter; it appears with a calculator icon. - Set its format to Percentage, one decimal, from the Measure tools ribbon.
- Create
Districts Reporting = DISTINCTCOUNT( fact[district] )for coverage. - Create the CALCULATE-based single-state measure and confirm filter context behaves as expected.
- Drop
Stunting Rateinto a card and a bar chart by district; the card shows the overall rate, the bars the per-district rates, from one measure.
Do not paste raw numbers into measures. If you find yourself typing a national average into a formula, stop. Hard-coded numbers go stale the moment the data updates and make the dashboard lie without anyone noticing. Compute from the data every time. The point of this whole tool is that next quarter's refresh updates every number on its own; a typed constant opts straight out of that promise.
- Using a calculated column for an aggregate
- Columns are fixed at refresh and waste memory. Rates, totals and shares are measures.
- Dividing with a plain slash
- A zero denominator errors and can break the visual. Use DIVIDE.
- Vague measure names
- ‘Measure 1’ is unmaintainable. Name for what it computes.
- Time calculations without a date table
- They misbehave. Mark a date table (Module 4) first.
Measure or column?. For each, decide measure or calculated column: (a) the percentage of children stunted, (b) a label marking each district 'aspirational' or 'other', (c) the number of distinct districts reporting, (d) the change in stunting since NFHS-4.
Show a worked answer
(a) Measure: a rate that recomputes for any selection. (b) Calculated column: a per-row classification that does not change with filters, so it can be stored and used as a slicer. (c) Measure: DISTINCTCOUNT over the current filter context. (d) Measure: a comparison across rounds via CALCULATE and a date table. The single column is (b), precisely because it is the one value that does not depend on what the user clicks.
- List the five numbers your dashboard must show. For each: measure (changes with selection) or column (fixed)? Most are measures.
- Where in your spreadsheets is a number typed into a formula? That hard-code should be computed.
- Would a colleague opening your model understand each measure from its name alone?
Resources
Visualisation Done Honestly
A chart makes a claim about the data, and the wrong chart or careless formatting makes a claim you did not intend. This module covers both building visuals and choosing them responsibly, which your Data Visualisation course goes into at length. Chart choice is not just taste: Cleveland and McGill (1984) measured how accurately people read each kind of encoding, and length on a common scale beats angle and area.
- Choose a chart from the question, using the perceptual accuracy hierarchy
- Build bars, lines, maps, cards and slicers and wire them to measures
- Avoid the count-versus-rate map trap and the truncated axis
- Make visuals accessible with sort order, labels and alt text
Match the chart to the question
Cleveland and McGill's hierarchy explains why bars beat pies: people judge length on a common baseline far more accurately than angle. Translate that into a working guide.
| The question | Use | Why |
|---|---|---|
| How do districts compare on one indicator? | Sorted bar | Length is read most accurately; sorting makes the ranking instant. |
| How has an indicator moved over rounds? | Line | Lines encode change over an ordered axis. Never for unordered categories. |
| Where is it high or low geographically? | Filled or bubble map | Spatial pattern jumps out, but mind the normalisation trap below. |
| What is the single headline number? | Card | One big figure for the rate or count that frames the page. |
| Exact values across two dimensions? | Matrix / table | When the reader needs numbers, not a shape, give a table. |
Building a visual, mechanically
Drag District to the Axis well and Stunting Rate to Values. The card and map run off the same measures.
You have the measures from Module 5. Put them on a page.
- Click a chart type in the Visualizations pane, or drag a field onto the canvas and accept the suggestion.
- Drag
Districtto Axis andStunting Rateto Values for a bar chart. - Use the visual's More options > Sort axis > by Stunting Rate, descending, so the worst districts read first.
- Add a Card and drop the overall
Stunting Ratefor the headline. - Add a Slicer with
State; clicking a state now filters every visual. - Add a Map, put district or state in Location and the measure in colour or bubble size; check the geocoding finds the right places.
The ethics are not optional
Power BI makes several misleading choices easy, and a couple are on by default. These are the same hazards your DataViz course names; here is how they show up in this tool.
Truncated axes
A bar chart whose y-axis does not start at zero exaggerates differences. Force bars to start at zero. For a line showing change, a non-zero start can be defensible if you say so.
Counts versus rates on maps
A choropleth coloured by the number of stunted children mostly maps population: big districts look bad for being big. Map the rate, unless the count is genuinely the point.
Pie charts past three slices
People compare angles poorly. Beyond three categories a sorted bar communicates better, exactly as Cleveland and McGill predict.
Colour and access
Do not encode meaning in red-green alone; about one man in twelve cannot separate them. Add labels or patterns, and write alt text so screen readers convey the visual.
The chart that most often misleads in our sector is the district map coloured by a raw count. A funder sees a dark patch over a populous district and concludes the problem is concentrated there, when that district simply has more people. Always ask: is this colour showing where the rate is worst, or where the most people live? Normalise to a rate and the map tells the truth. This is not a styling preference; it is the difference between a map that informs a decision and one that misdirects money.
Write the one-sentence takeaway before you format anything. If the sentence is ‘stunting is worst in these five districts’, then those five bars should be the darkest thing on the page and everything else should recede. If everything on the page is emphasised, nothing stands out. Knaflic calls this drawing attention; in practice it means deciding what the reader should notice first, then making the design obey.
- Truncated bar axes
- Small real gaps look huge. Start bars at zero.
- Count maps for a rate question
- They map population. Colour by the rate.
- Red-green as the only signal
- Colour-blind readers lose the message. Add labels or patterns and alt text.
- A pie with eight slices
- Unreadable angles. Use a sorted bar.
Diagnose a misleading dashboard. A district health dashboard shows a map shaded by total anaemia cases, a bar chart of six blocks with the y-axis starting at 40 percent, and a red-green legend with no labels. Name what each could mislead a reader into believing, and the fix.
Show a worked answer
The count map implies anaemia is concentrated in the most populous districts; a reader may steer resources there even if their rate is average. Fix: colour by anaemia prevalence (a rate). The truncated bar axis at 40 percent exaggerates small differences between blocks, suggesting a crisis gap where there may be a few points; fix: start the axis at zero. The red-green legend without labels is invisible to colour-blind readers and ambiguous to everyone; fix: add direct labels or a pattern, and write alt text. None of these is dishonesty by intent, which is exactly why they are dangerous: the defaults made the claims, not the analyst.
- Compare a dashboard you admire with one you find confusing. What chart choices separate them?
- Do any of your maps colour by count rather than rate? What decision might that have nudged wrongly?
- Pick a visual you make often. Could a colour-blind colleague read it without the colour? If not, what fixes it?
Resources
Report Design and Interactivity
A handful of visuals is not yet a report. A good report is a single page a busy district officer can take in quickly and then explore further. Stephen Few defines a dashboard as the most important information needed to meet an objective, arranged on one screen so it can be monitored at a glance. If the reader has to scroll through pages, you have built a report, not a dashboard.
- Lay out a single-page dashboard with a clear visual hierarchy
- Use cross-filtering, drill-through and bookmarks so one page does the work of ten
- Apply Shneiderman's overview-zoom-filter-detail pattern to interactivity
- Set a report theme so a whole organisation's dashboards stay consistent
One page, well laid out
The default canvas is a corporate 16:9 rectangle. Treat it as a designed page.
- Top strip for headline cards: the two or three numbers that frame everything, national rate, districts reporting, change since the last round.
- A clear primary visual, usually the sorted bar or the map, given the most space.
- Slicers grouped together, top or left, so the reader knows where the controls are.
- Alignment and spacing: View > Gridlines and Snap to grid. Misaligned visuals read as careless and cost you credibility you never see being spent.
- A title and a source line: every report states what it shows and where the data came from, with the survey round and year. In our sector an unsourced number is worthless.
Interactivity that earns the page back
Ben Shneiderman's information-seeking mantra is the design rule: overview first, zoom and filter, then details on demand. Power BI gives you the pieces.
Cross-filtering
Click a bar and every other visual filters to it, no setup. Click Bihar and the map, cards and tables narrow to Bihar. Tune it per visual via Format > Edit interactions.
Drill-through
Right-click a district and jump to a detail page built for one district, carrying the filter. The summary stays clean; detail lives one click away (details on demand).
Bookmarks and buttons
Capture a page state, filters and visibility, and bind it to a button. Build a Health / Education / Nutrition toggle that swaps focus without leaving the page.
Report-page tooltips
Design a mini-page and set it as a tooltip, so hovering a district shows a small custom card instead of a bare number.
View > turn on Gridlines and Snap to grid. Drop three Cards across the top for your headline measures and align their tops with Format > Align. Place the sorted bar and the map below, giving the bar more width. Group the slicers in one corner; add a Text box title and a one-line source. Create a second page as a district detail view, select the bar, and set up Drill through on the District field so a right-click jumps there carrying the filter. Add two Bookmarks, one for health indicators and one for education, and wire each to a button via Insert > Buttons with Action set to Bookmark. Now test as a reader: click a state, drill into a district, use the toggle. Whatever surprises you is a design bug; fix it before anyone else sees it.
Design for the person with ninety seconds and a specific question, not for yourself who knows where everything is. My test: hand the report to someone who has never seen it and say nothing. Watch where their eyes go and where they stall. If they cannot find the headline number in three seconds, or do not realise the bars are clickable, the design failed regardless of how clever the model underneath is. A dashboard nobody can navigate is a private spreadsheet with extra steps.
Power BI ships with theme JSON. View > Themes loads a small file that sets palette and fonts once, so every visual is consistent and on-brand. Build one theme for your organisation and reuse it: the same instinct as the design tokens behind a good website.
Resist the urge to add one more chart. Every visual you add taxes the reader's attention and the page's load time. The strongest M&E dashboards I have seen show four or five things well and send everything else to a drill-through page. If a stakeholder asks for ‘just one more number’, ask which existing one it replaces. Restraint is a design decision, and usually the right one.
- Misaligned, ungridded visuals
- They read as careless. Turn on Snap to grid and align.
- No source line
- An unsourced number cannot be trusted. State the round and year on every page.
- One crowded page instead of summary plus drill-through
- Send detail to a drill-through page and keep the summary clean.
- Inconsistent colours across reports
- Build one theme JSON and reuse it organisation-wide.
Redesign brief. A team's dashboard is a single page with nine visuals, no titles, slicers scattered in three corners, and the key chart bottom-right in the smallest tile. Give three concrete changes, in priority order, and the interactivity feature that would let them cut visuals without losing detail.
Show a worked answer
First, establish hierarchy: move the key chart to the top-left and enlarge it; demote or remove the least-used visuals. Second, group the slicers in one corner so the controls are findable. Third, add a title and source line so the page is self-explanatory and trustworthy. To cut visuals without losing detail, use drill-through: keep a clean four-or-five-visual summary and move the detailed breakdowns to a per-item detail page reached by right-click, which is Shneiderman's details on demand. The aim is fewer things, better placed, with depth one click away.
- Hand a report you made to a colleague with no explanation. Where do they stall? That is your redesign list.
- Which report would benefit from a clean summary plus a drill-through detail page rather than one crowded page?
- Does your organisation have a consistent look across dashboards? A single theme JSON fixes it in an afternoon.
Resources
Sharing the Free Way
This is where ‘free’ needs an asterisk. Building a report costs nothing; sharing it, beyond a few channels, either costs money or carries risk. This module sets out what you can do for free, where the paid wall sits, and the privacy obligations on anyone who publishes data about real people in India.
- List the genuinely free ways to share and what each is good for
- Locate the Pro wall and price live sharing per person
- Judge when Publish to web is safe, and when it is a serious risk
- Apply the DPDP Act 2023's practical floor to what you publish
The free ways to share
Export to PDF / PowerPoint
File > Export. Free from Desktop. The PDF is static; the PowerPoint drops each page as an image. Fine for a board pack or an email.
Hand over the .pbix
Send the file. The recipient opens it in their free Desktop and interacts fully. The catch: they need Windows and the data travels with the file.
Print or screenshot
Crude but free. For a one-off figure in a report, sometimes the honest answer.
The wall, plainly. To publish a report to the Service so colleagues view it live in a browser, the publisher needs a Pro licence, 14 US dollars per user per month in 2026. For others to view it, each also needs Pro, unless the report sits on a large dedicated capacity (Fabric F64 or above) that only big organisations buy. A five-person team that all wants live access is five Pro licences, around 70 US dollars a month. The free path is Desktop plus PDF, PowerPoint or .pbix handoff. That is a real limit, not a trick.
Publish to web: powerful and dangerous
There is a free-feeling option called Publish to web. It produces a public link and embed code, no licence needed to view. Read this twice: Publish to web makes the report and its data visible to anyone on the internet, with no authentication. Search engines can index it. It is built for public, non-sensitive content like an open data story. It is never for personal data, unpublished figures, or anything a community has not consented to share.
The Publish to web dialog carries its own warning. Take it literally: this is a printing press, not a private channel.
People have leaked salary tables, patient lists and unreleased survey data this way, believing an obscure link was private. It is not. If the data should not be on a billboard, it must not go through Publish to web.
Row-level security, and where it applies
Row-level security (RLS) lets you define roles so a Bihar officer sees only Bihar rows. You set it up in Desktop under Modeling > Manage roles, writing a filter per role. The honest catch: RLS is only enforced once the report is published to the Service with Pro, Premium or capacity licensing. In a .pbix handed to someone, RLS protects nothing, because they hold the whole file. RLS is a sharing-tier control, not a substitute for keeping sensitive data out of the file.
Manage roles in Desktop: a DAX filter per role. It does real work only on the published, licensed Service.
The legal floor: the DPDP Act, 2023
India's Digital Personal Data Protection Act, 2023 governs the processing of digital personal data. For a dashboard builder, the practical implications are concrete and sit upstream of any sharing decision.
- Personal data needs a lawful basis. Beneficiary names, phone numbers, household identifiers, and health details about identifiable individuals are personal data. District aggregates usually are not, which is why district-level dashboards are the safer default.
- Purpose and minimisation. Hold only what the dashboard genuinely needs. If district aggregates answer the question, do not load the individual records at all.
- Children's data carries heightened obligations under the Act. Education and child-health datasets deserve particular care.
- Sharing is processing. Publishing a dashboard that exposes personal data, especially via Publish to web, is a processing act you must be able to justify.
This is general information, not legal advice for your situation, and the DPDP Act's rules continue to be operationalised through subordinate rules. The safe engineering default that keeps you clear of most of it: build on aggregates, keep identifiable records off any shared or published artifact, and document why each personal field, if any, is present.
Sharing is really a governance question, not a software one. Before anyone asks how to publish, ask what is in the report, who should see it, and what happens if the link gets out. Most dashboards in our sector should not contain a single identifiable person; work at district or block level and the privacy problem mostly goes away. When a programme genuinely needs individual-level views, slow down, involve someone who knows the DPDP Act, and treat RLS and access control seriously.
Cost the sharing honestly at the start of a project, not the end. If five people need live browser access, that is roughly 70 US dollars a month, every month, forever. Sometimes a scheduled PDF emailed round is the right answer and saves a budget line that a small organisation cannot spare. The tool's defaults nudge you toward the paid cloud; your job is to ask whether the question really needs it.
- Assuming live sharing is free
- Publishing for live viewing needs Pro per person. Free routes are PDF, PowerPoint, .pbix.
- Using Publish to web for sensitive data
- It is fully public and indexable. Open content only.
- Trusting RLS in a handed-over .pbix
- RLS is enforced only on the licensed Service. The file holds everything.
- Loading personal records you do not need
- Build on aggregates; minimise to stay clear of most DPDP obligations.
Choose a sharing route. A district health programme wants twelve block officers to each see only their own block's live dashboard, refreshed weekly, and the data includes facility-level counts but no patient identifiers. What do you recommend, and what does it cost and require?
Show a worked answer
Live, per-officer filtered views mean publishing to the Service with row-level security: define a role per block (or a dynamic role keyed to the officer's login) in Desktop under Manage roles, then publish. RLS is enforced only on the licensed Service, so each of the twelve officers who needs live access needs a Pro licence, roughly 12 times 14 = 168 US dollars a month, unless the organisation has Fabric capacity. Weekly refresh is a scheduled refresh in the Service, within Pro limits. Because the data is facility-level counts with no identifiers, the DPDP exposure is low, but confirm no field re-identifies individuals. If the budget cannot carry twelve Pro seats, the fallback is twelve filtered PDFs emailed weekly, which is free but static and loses the live interactivity.
- Count the people who genuinely need live access to your next dashboard, times 14 US dollars. Budgeted, or is a PDF the honest answer?
- Does anything you plan to share contain identifiable individuals? What will you aggregate away before it leaves your machine?
- Write the one-sentence question your capstone answers. If you cannot, it is not ready to build.
Resources
Two calculators to use as you plan
These run entirely in your browser; nothing is sent anywhere. Use the first when you budget a rollout, the second whenever you are unsure how to build a number.
Licence cost calculator
How many people need to view or build a live shared report in a browser? (PDF and .pbix handoff are free and do not count here.)
Measure or calculated column?
Answer two questions about the number you want to build.
1. Does the value change when a user clicks a slicer or filter?
2. Do you want to slice or group BY this value (use it as a category)?
How you know you have it
Each module ends with five self-check questions, 40 in all, plus an applied challenge with a worked answer. They are formative: immediate feedback, no score kept. You have understood the course when you can do the following without looking back.
- Install Power BI Desktop for free and explain to a Mac user their realistic options
- Load a messy survey CSV with the right encoding and reshape it from wide to long
- Build a star schema and explain its grain in one sentence
- Write a rate as a measure with DIVIDE, and a comparison with CALCULATE
- Choose a chart from the question and avoid the count-map and truncated-axis traps
- Assemble a one-page dashboard with drill-through and a source line
- Pick a sharing route, price it, and keep personal data off anything published
If any line is shaky, the module that covers it is one click away in the sidebar. The real assessment is the capstone below.
Point the whole course at your own data
The capstone is what turns the course into your tool. Take everything from Modules 2 to 7 and build a dashboard a colleague could use on Monday. Allow three to four sittings; the milestones below mirror how the wider ImpactMojo capstones are run.
The brief
Choose one question your programme needs answered every month or quarter. Build a Power BI report that answers it from real data, at district or block aggregate level. Deliverables: the .pbix, a one-page summary exported to PDF, and a short note stating the data source and round, the refresh cadence, and the sharing decision with its cost.
How it is judged
| Criterion | What a weak version looks like | What a strong version looks like |
|---|---|---|
| A real, named question | ‘A dashboard about health’ | ‘Which blocks are below the district stunting average this round, and by how much?’ |
| Data preparation | Edits done by hand, unrecorded | Power Query steps recorded, reshaped to long, types set, keys trimmed |
| Model | One flat table | A star with a named grain, a date table, clean one-to-many relationships |
| Measures | Numbers typed into formulas | Named measures using DIVIDE; comparisons via CALCULATE |
| Visuals | Count map, truncated axis, eight-slice pie | Rate map, zero-based bars, sorted, labelled, with alt text |
| Honesty & privacy | Identifiable data, no source line | Aggregates only, source and round stated, sharing route costed |
Bring a capstone to the ImpactMojo dojos or coaching for feedback. For a strong addition, add a World Bank cross-country page via Get Data > Web alongside your national programme view.
Where to get real data to practise on
A starting shelf of free, public datasets that load cleanly into Power BI with the techniques in this course. Always state the source and the year on any report built from them, and prefer aggregates over identifiable records.
| Source | What it holds | Good for | How to load |
|---|---|---|---|
| NFHS-5 (IIPS / MoHFW) | Health, nutrition, fertility for 707 districts, 2019-21 | District health and nutrition dashboards (the running case here) | CSV or Excel from the factsheet portal |
| ASER (Pratham) | Rural children's reading and arithmetic levels | Education-outcome cleaning and trend work | CSV; expect a title row and wide layout |
| UDISE+ (Min. of Education) | School-level education statistics | Schooling infrastructure and enrolment views | CSV / Excel exports |
| World Bank Open Data | Cross-country development indicators | Comparison pages and benchmarking | Get Data > Web (API or CSV) |
| data.gov.in | Wide range of Indian government datasets | Programme and scheme dashboards | CSV; often needs UTF-8 and reshaping |
| Census of India | Population, housing, demographics | Denominators for rates, dimension tables | Excel / CSV tables |
Part of a wider open network
Power BI sits alongside the other ImpactMojo flagships and tools. These pair naturally with what you have learned.
Who built this
Varna
Co-founder, ImpactMojo
A development economist and lawyer who has spent years turning messy programme data into things people can act on. Coaches the odd-numbered modules.
Vandana Soni
Co-founder, ImpactMojo
Brings the practitioner's eye to every dashboard: who reads it, what decision it serves, what could go wrong. Coaches the even-numbered modules.
ImpactMojo is a free, open-access development education platform for South Asian practitioners, sponsored by PinPoint Ventures. Everything here is free and forkable.