
Book 23 of 50 · Free
Power BI: Build Your First Dashboard
25,756 words · 17 chapters · illustrated

Book 23 of 50 · Free
25,756 words · 17 chapters · illustrated
Book 23 of 50 — AstolixGen Learning Series For researcher and publication students

Most researchers collect data and then drown in it. You run the survey, download the experiment logs, export the sensor readings — and now you have a spreadsheet with hundreds or thousands of rows that no supervisor wants to scroll through. What your thesis committee, your journal reviewers, and your conference audience actually want is a clear picture: one page that shows what you found, lets them ask questions of the data, and updates itself when you add new responses.
That is what Power BI does. It is Microsoft's business intelligence platform, but do not let the word "business" fool you — universities, NGOs, and research teams use it every day to explore data, build interactive reports, and publish professional dashboards. With Power BI you can connect to an Excel file or a CSV, clean it up, join tables together, calculate measures like averages and growth rates, and build a report full of charts, maps, and slicers that your readers can interact with. You can then publish that report to the web and share a live link in your thesis appendix or your presentation.
This book takes you from zero to a complete published dashboard in twelve detailed chapters. You do not need programming experience. You do not need a paid license to start. All you need is a Windows computer and the free Power BI Desktop application. Along the way we will work with one running example — a household survey dataset, exactly the kind of data an MS or PhD student collects — so every skill you learn is immediately tied to a real research scenario.
By the end of this book you will have built, cleaned, modeled, measured, visualized, and published a complete research dashboard — the kind of artifact that strengthens a thesis, impresses reviewers, and communicates results far better than a static table ever could.
Prerequisites: You should be comfortable with spreadsheets (sorting, filtering, basic formulas like SUM and AVERAGE) and you should have a Windows PC (or Windows access via a lab machine or virtual machine) for Power BI Desktop. No programming, statistics, or database experience is assumed — every DAX formula and every Power Query step is introduced from zero, and the one running example is reused across all twelve chapters so nothing is ever unfamiliar for long.
A note on versions: Power BI Desktop updates monthly, so buttons occasionally move and screenshots in any book drift out of date. The concepts in this book — queries, relationships, filter context, measures — have been stable for years and will remain so. If a click-path does not match your screen exactly, search the ribbon for the feature's name; it is there under a nearby tab. When in doubt, Microsoft Learn's Power BI documentation (see References) is the authoritative, always-current companion to this book.
Learning objectives: By the end of this book, you will be able to: - Explain what Power BI is and choose the right component (Desktop, Service, Mobile) and license for a research project. - Install and navigate Power BI Desktop, including its Report, Data, and Model views. - Connect to Excel, CSV, web, and database sources, and understand the difference between Import and DirectQuery storage modes. - Use Power Query Editor to clean real-world messy data: remove errors, fix data types, split and merge columns, unpivot survey tables, and build a repeatable refreshable pipeline. - Design a simple data model with correct relationships and a star schema, avoiding the double-counting and ambiguity problems that ruin analyses. - Build the essential visuals — bar and column charts, line charts, cards, tables, matrices, maps, and KPIs — and choose the right chart for the question you are answering. - Control interactivity with filters, slicers, drillthrough, and cross-filtering, and validate that every interaction shows correct numbers. - Write your first DAX measures — sums, averages, counts, percentages, and time-intelligence basics — and understand the difference between a measure and a calculated column. - Apply professional formatting and design principles so your report looks like a publication-quality figure, not a spreadsheet screenshot. - Publish a report to the Power BI Service, manage datasets and scheduled refresh, and share it securely with collaborators or supervisors. - Present research results as a dashboard: selecting findings, adding narrative text, and making the dashboard defensible in a thesis defense. - Complete an end-to-end capstone: from a raw CSV file to a published, shareable dashboard.
How to use this book: Chapters 1–3 get you installed and connected (one sitting). Chapters 4–5 build your data foundation — do not rush these; every later chapter assumes them. Chapters 6–9 are the creative core: build alongside the text with Power BI open. Chapters 10–11 take your work public and defensible. Chapter 12 is the full rehearsal. Each chapter ends with a "For your research" box tying the skill to thesis work and a pitfall list drawn from real beginner mistakes — read the pitfalls even if you skim the chapter; they are the condensed wisdom of this book.
Business intelligence (BI) is a set of tools and methods that turn raw data into decisions. In companies, that means sales dashboards and profit reports. In research, the "decision" is different: your readers decide whether your findings are trustworthy, your committee decides whether your defense passes, and other researchers decide whether to build on your work. The mechanism, though, is the same — you take raw observations, shape them into evidence, and present them so a human brain can grasp the pattern in seconds instead of hours.
Before BI tools, the typical research workflow was: collect data in Excel, wrestle with formulas, paste charts into Word, and produce a static document. Every time the data changed — new survey responses, a corrected coding — you repeated the whole painful cycle by hand. Power BI replaces that cycle with a refreshable pipeline: you define the cleaning steps and calculations once, and every new batch of data flows through them automatically. Your report updates itself. For a student collecting survey responses over several months, this is transformative. Your Chapter 4 results section can stay current until the day you submit.
Power BI Desktop is a free Windows application where you do almost all the authoring work. This is where you connect to data, clean it in Power Query, build the data model, write DAX calculations, and design report pages. Think of Desktop as your laboratory. You will spend Chapters 2 through 9 of this book inside it. One limitation to know upfront: Power BI Desktop runs only on Windows. If you use a Mac or Linux machine, you will need a Windows virtual machine, remote desktop to a lab PC, or the browser-based authoring available in the Power BI Service.
Power BI Service (also called the Power BI portal) is the cloud part, at app.powerbi.com. After you build a report in Desktop, you publish it to the Service. There it lives in a workspace, where it can be refreshed on a schedule, viewed in a browser by anyone you share it with, and pinned into dashboards. The Service is also where collaboration happens: comments, subscriptions (scheduled emails of report screenshots), alerts on data changes, and sharing with specific people or groups. For research teams, the Service is the shared reading room: you keep the data safe and let your supervisor, co-authors, or committee view the live report.
Power BI Mobile is the phone and tablet app (iOS and Android) that lets you view reports and dashboards published to the Service. You will not design reports on it, but it matters for research: imagine walking into a field site or a stakeholder meeting and pulling up your live dashboard on your phone. It is also genuinely useful for a defense rehearsal — one less laptop cable to fight.
There are also a few smaller pieces you will hear about. Power BI Report Builder creates old-style paginated reports (pixel-perfect documents for printing — the kind of formal report an institution might require). Power BI Report Server is an on-premises server for organizations that cannot put data in the cloud. As a student, you can ignore both for now; Desktop plus Service covers everything in this book.
Licensing is the part of Power BI that confuses everyone, so let us make it plain.
Bottom line for students: Install free Desktop. If your university email unlocks a free or Pro Service account, use it. Do not buy a license out of your own pocket for a first project — confirm with your institution first.
You might reasonably ask: why not just use Excel charts, or Python with matplotlib, or SPSS? Here is the honest comparison.
Excel is wonderful for small, static analysis, but its charts do not refresh through a defined pipeline, it struggles past a few hundred thousand rows, and sharing "the dashboard" usually means emailing a file. Python is powerful and fully programmable, but it demands coding skill, and turning a matplotlib script into an interactive report your non-technical supervisor can explore requires extra frameworks. SPSS/Stata/R serve statistical analysis beautifully, but their interactive reporting capabilities are limited. Power BI's strength is the combination: a point-and-click data-cleaning pipeline, a real analytical engine (DAX), genuinely interactive visuals, and one-click publishing to the web — in a single free tool. Its weakness: it is weaker than Python or R for custom statistics and machine learning, and it is Windows-centric.
A sensible research stack often combines them: clean and analyze in Python or SPSS if you must, then present in Power BI — or do the whole descriptive-statistics layer in Power BI and reserve the statistics software for hypothesis testing.
Under the hood, Power BI's calculations run on the same engine that powers SQL Server Analysis Services — an in-memory columnar database. You do not need to understand the internals, but the practical consequence matters: Power BI is extremely fast at aggregating millions of rows. Filtering, summing, and averaging across a million-row dataset happens in fractions of a second. That is why a dashboard feels instant even with serious data. It also means Power BI is designed around a specific mental model — tables, relationships, and measures — which Chapters 5 and 8 will teach you carefully. Half of all beginner confusion in Power BI comes from fighting this model instead of working with it.
In recent years Microsoft has folded Power BI into a larger platform called Microsoft Fabric — a unified analytics environment that also includes data engineering (Spark notebooks), data warehousing, real-time streaming, and AI services, all sharing a common storage layer called OneLake. As a student you do not need to learn Fabric to complete this book, but you should understand where Power BI sits in it, because your university's IT department may mention it and because job descriptions increasingly say "Fabric/Power BI" together.
The practical relationship is simple: Power BI remains the visualization and semantic-modeling layer; Fabric adds the heavy-duty data plumbing around it. A Fabric trial capacity (free for 60 days) gives you Premium-grade Power BI features — larger datasets, AI visuals, deployment pipelines, dataflows — without paying. If your thesis dataset grows past a few million rows, or you want to try the AI features in Chapter 12's "next steps," a Fabric trial is the legitimate free route. One caution: trial capacities expire, and anything depending on Premium features stops working when they do — so build your core thesis dashboard on standard features (everything in this book) and treat Fabric extras as experiments, not foundations. When in doubt, ask your supervisor or IT department whether the university holds a Fabric capacity you can use; many institutions now do through their Microsoft education agreements.
For your research: Before you install anything, answer three questions in your research notebook: (1) Where does my data live today (Excel, CSV, Google Forms export, SQL database)? (2) Who needs to see the results — just my supervisor, or a committee, or the public? (3) Does my university email get me a Power BI Service account? The answers decide your sharing strategy for Chapter 10 and keep you from designing a report you cannot legally or practically distribute.
Key takeaways: - Power BI = Desktop (free authoring on Windows) + Service (cloud publishing and sharing) + Mobile (viewing). Desktop is where you build; the Service is where you share. - Desktop is free forever; the Service needs an organizational email, and sharing needs Pro — check your university's Microsoft 365 plan before spending money. - Power BI's value for researchers is the refreshable pipeline: define cleaning and calculations once, and your results stay current as data grows. - It complements rather than replaces Excel, Python, and SPSS — use each where it is strongest.
The installation is straightforward and takes about ten minutes on a typical laptop.
Step 1 — Get the installer. There are two official routes. The simplest is the Microsoft Store: open the Store app on Windows, search for "Power BI Desktop," and click Install. The Store version updates itself automatically, which is genuinely convenient. The alternative is the standalone installer from Microsoft's Power BI download page (search "Download Power BI Desktop" on the web). The standalone installer lets you choose when to update, which some labs prefer. Both are the same product; monthly updates mean the two rarely differ by more than a few weeks.
Step 2 — Run through setup. Accept the license, choose the install location (the default is fine), and wait. There is no configuration wizard and no database to install — Power BI Desktop is self-contained.
Step 3 — Sign in (recommended but optional). When you first open Desktop, it may invite you to sign in with your organizational account. You can skip this and use Desktop fully offline. Sign-in becomes necessary only when you publish to the Service (Chapter 10). If you have a university email, signing in now saves a step later.
System notes: Power BI Desktop requires Windows 10/11 (64-bit) and .NET components that the installer handles. For the datasets in this book, 8 GB of RAM is plenty. If you are on macOS, the practical options are a Windows VM (Parallels, VMware, or VirtualBox), a cloud Windows desktop, or your university's lab machines. Power BI does not run natively on Mac or Linux, and there is no announced plan for it to do so — this is the single biggest platform limitation, so settle your Windows access before Chapter 3.
When you open Power BI Desktop, you see a welcome screen offering to get data, open recent files, and see what's new. Close it (or click "Get data" if you are eager — we will do that properly in Chapter 3). What remains is the main window, and it is worth learning its geography deliberately rather than clicking around at random.
Down the left edge of the window are three icons. These are the three views, and each is a different room in the same house. You will switch between them constantly.
Report view (the top icon, looks like a bar chart) is where you design pages full of visuals. The large central area is the canvas — the page your readers will see. On the right side you have the Visualizations pane (choose chart types and drag fields into them) and the Fields pane (your tables and columns, listed like a folder tree). A Filters pane appears when you need it. Report view is your design studio; Chapters 6, 7, and 9 live here.
Data view (the middle icon, looks like a table) shows your actual data, table by table, exactly as it sits in the model after cleaning. You can sort, look at values, and — importantly — create new columns and tables here. But you cannot edit individual cells; the data here is the output of your Power Query steps, not a spreadsheet you type into. Use Data view as your inspection window: whenever numbers look wrong in a visual, come here and look at the raw rows.
Model view (the bottom icon, looks like a diagram) shows your tables as boxes connected by lines — the relationships. This is where you verify and fix how tables join together. A quick glance at Model view tells an experienced user whether a report's numbers can be trusted. Chapter 5 is entirely about getting this view right.
A useful habit: after every import and every transformation, spend thirty seconds in Data view and Model view checking that what you expected actually happened. Beginners who skip this build reports on broken data and discover it during their defense.
The top ribbon changes with the active view and the selected visual. In Report view the Home tab holds paste, get data, transform data, new visual, and publish. The Insert tab adds text boxes, buttons, shapes, and images. The Modeling tab is where you create measures, calculated columns, and calculated tables (Chapter 8). The View tab toggles panes and page settings like size and theme.
The right-hand Visualizations pane has three parts: the gallery of visual types (clustered bar, line, pie, card, and dozens more), the field wells (X-axis, Y-axis, Values, Legend, Tooltips — slots where you drop columns), and the format section (the paint-roller icon) where you control colors, labels, titles, and backgrounds. The Fields pane below or beside it lists every table; expand a table to see its columns, with different icons for text, numbers, dates, and measures (a small calculator icon).
Learn this keyboard habit early: Ctrl+Z undoes, and the Selection pane (View tab) lists every object on the page so you can select, hide, or rename overlapping visuals — indispensable once a page gets busy.
Power BI Desktop saves as a .pbix file — a single file containing your data model, queries, measures, and report pages. Keep your .pbix files in a project folder with a clear name, e.g., thesis-dashboard-v03.pbix, and version them as you work (save copies before big changes). There is also a .pbit template format that saves everything except the data — useful for sharing a report structure with a colleague who will load their own dataset. Note: .pbix files store imported data, so they can grow large; a file with a few million rows can exceed a gigabyte. For this book's datasets, files will stay under a few megabytes.
Microsoft updates Power BI Desktop every month with new features, new visuals, and interface tweaks. Screenshots in any book — including this one — will drift slightly out of date. The core concepts (queries, relationships, measures, visuals) are stable; only button placement and names occasionally move. If a click-path in this book does not match your screen exactly, search the ribbon for the same feature name — it is almost certainly still there under a nearby tab. The Microsoft Store version updating automatically is the easiest way to stay current.
Power BI Desktop ships with sensible defaults, but five settings are worth changing on day one. Open File → Options and settings → Options:
These five minutes of configuration prevent an entire category of "why does my date look wrong" and "where did this table come from" questions later.
Before Chapter 3's real data arrives, spend fifteen minutes on this orientation drill with the free Power BI sample reports (File → Open → browse to the built-in samples, or download "Power BI Desktop samples" from Microsoft Learn). Open one and do the following, in order: (1) In Report view, click five different visuals and watch the others react — say out loud what filtered what. (2) Open the Filters pane and read every active filter on the current page. (3) Switch to Data view, pick the largest table, and sort two columns — notice you cannot edit cells. (4) Switch to Model view and trace one relationship line with your finger: which table is the "one" side? (5) Select a visual, open Edit interactions, and set one visual to None — observe the change, then undo. This drill builds the spatial memory — where things live — that makes every later chapter faster. Students who skip orientation spend the whole book hunting for panes; fifteen minutes here pays for itself by Chapter 4.
For your research: Set up a project folder now, e.g., Documents/thesis-dashboard/, with subfolders data/ (raw CSVs/Excel files — never edit these originals), pbix/ (versioned .pbix files), and notes/ (a text file where you log each transformation decision and why). When your methodology chapter asks "how was the data processed?", this folder is your answer. Reviewers and examiners love an auditable trail, and this habit gives you one for free.
Key takeaways: - Install from the Microsoft Store for automatic updates; Desktop is free and works offline. - Master the three views: Report (design), Data (inspect), Model (relationships). Check Data and Model views after every data change. - Learn the Visualizations pane (chart types + field wells + formatting), the Fields pane (your columns), and the Selection pane (managing objects on a page). - Version your .pbix files and keep raw data files untouched in a separate folder.
In Power BI, connecting to data is not the same as opening a file. When you connect, Power BI records a query: a saved recipe that says "go to this file, read these rows, apply these cleaning steps." The data is then loaded into Power BI's in-memory engine. This matters because the connection is live in a specific sense: if the source file changes and you press Refresh, Power BI re-runs the recipe and pulls the new data through all your cleaning steps automatically. That is the refreshable pipeline from Chapter 1, and it begins the moment you connect properly.
For the rest of this book we will use one consistent dataset — a realistic MS-thesis-style survey. Imagine a research team studying household cooking fuel in a rural district. They surveyed 300 households and recorded: a household ID, the village name, the primary cooking fuel (firewood, charcoal, LPG, kerosene, biogas), monthly fuel spending, household size, whether anyone reported respiratory symptoms in the past year, and the survey date. This is exactly the kind of wide, messy, real-world table a student collects — with typos in village names, inconsistent capitalization of fuel types, a few blank spending values, and dates in mixed formats. We will import it now, clean it in Chapter 4, model it in Chapter 5, and build it into a dashboard by Chapter 12.
A small sample of what the raw CSV looks like:
| HouseholdID | Village | Fuel | MonthlySpend | HHSize | RespSymptoms | SurveyDate |
|---|---|---|---|---|---|---|
| H001 | Kotli | firewood | 2500 | 6 | Yes | 2026-01-12 |
| H002 | kotli | Firewood | 2800 | 5 | no | 12/01/2026 |
| H003 | Mirpur | LPG | 4 | No | 2026-01-13 | |
| H004 | Kotli | Charcoal | 3100 | 7 | YES | 2026-13-01 |
Notice the problems already: "Kotli" vs "kotli", "firewood" vs "Firewood", a blank spend, an impossible date (month 13). Real data always looks like this. Power BI's job is to make it analyzable without you hand-editing 300 rows.
This is the path you will use most as a student, so learn it precisely.
Excel:
1. In Power BI Desktop, go to the Home tab → click Get data → choose Excel Workbook → click Connect.
2. Browse to your .xlsx file and open it. A Navigator window appears listing every sheet and named table/range in the workbook.
3. Select the sheet or table you want. A preview appears on the right — check that the column headers look right and the first rows are real data, not title rows.
4. Click Load to import directly, or Transform Data to open Power Query first (recommended whenever the sheet is messy — which is usually). For our survey file, choose Transform Data.
CSV / text files:
1. Home → Get data → Text/CSV → Connect → browse to your .csv.
2. The preview dialog shows the delimiter Power BI detected (comma, semicolon, tab), the encoding, and the first 200 rows. This dialog is your first quality check: if columns look merged into one, the delimiter is wrong — change it in the dropdown before loading.
3. Again, prefer Transform Data over Load for real-world files.
Practical tips for file sources: Keep the source file in a stable location — if you move or rename it, the query breaks and you will need to fix the source path (in Power Query: right-click the first step, "Source," and point it at the new location). Use a relative-friendly folder structure (project folder with a data subfolder) so the path stays valid when you move the project. And never edit the raw file to fix data problems — fix them in Power Query instead, so the fix is documented and repeatable.
Power BI can pull tables directly from web pages — useful for public datasets, published statistics, and reference tables.
Caution for research: web sources change without notice. A table that exists today may be redesigned tomorrow, breaking your query. For a thesis, download a snapshot of web data into a CSV, cite the access date, and connect to the file. Use live web connections for monitoring dashboards, not for evidence you must reproduce.
If your data lives in a university database or a lab SQL Server, the path is Home → Get data → SQL Server (or Oracle, MySQL, PostgreSQL under the Database category). You enter the server name and database name, choose credentials, and then either pick tables in the Navigator or write a SQL query. Writing your own SQL in the connection dialog (the "Advanced options" SQL statement box) is often the cleanest approach: the database does the heavy filtering and joining, and Power BI receives a tidy result set. You do not need to master SQL for this book, but if your lab uses databases, learning SELECT ... FROM ... WHERE ... pays off quickly.
When you connect, Power BI asks (or defaults to) a storage mode. This is a consequential choice.
There is also a Composite/Dual mode mixing both, but you do not need it yet. Rule of thumb: use Import unless someone with authority over a large database tells you otherwise.
Research data often arrives in pieces: one CSV per survey round, one Excel sheet per village, monthly exports from a device. Power BI handles this elegantly with folder and append patterns. Connect via Get data → Folder, point at the folder containing all the CSVs, and Power BI combines files with the same structure into one table — new files dropped into the folder appear on the next refresh. For a longitudinal study collecting monthly survey batches, this single feature can save you hours of copy-paste every month. We will use a two-round version of this in the capstone.
For your research: Create your dataset inventory today: a one-page table listing every data file for your study — filename, source (survey round, device, download), date range, number of rows, and who collected it. Tape it (figuratively) to your project folder. When you connect each file in Power BI, you will know exactly what you are looking at, and your methodology section practically writes itself: "Data were collected in three rounds (Jan–Mar 2026), stored as CSV exports, and integrated in Power BI via folder-based append."
Key takeaways: - Connecting creates a saved, refreshable query — not a one-time import. Refresh re-runs the whole pipeline. - For messy real-world files, choose Transform Data (Power Query) over Load. - Check delimiters, encoding, and headers in the preview dialog before loading — two minutes here saves two hours later. - Use Import mode for research datasets; use the Folder connector to combine multi-round survey files automatically. - Never edit raw source files to fix data — fix in Power Query so every fix is documented and repeatable.
Two connection settings trip up beginners the moment they combine sources — which you will do in the capstone — so learn them now.
Data source credentials: databases and web APIs need credentials (username/password, API key, or organizational login). Power BI stores them per data source: File → Options and settings → Data source settings. If a query that worked yesterday suddenly asks for credentials, open Data source settings, select the source, and choose Edit Permissions to re-enter them. Credentials also matter at publish time: the Service needs its own copy of database credentials (dataset → Settings → Data source credentials), and expired credentials are the #1 cause of scheduled-refresh failures (Chapter 10).
Privacy levels: when a query combines two sources (e.g., your CSV merged with a web lookup table), Power BI asks for each source's privacy level: Public, Organizational, or Private. This controls whether data from one source may be sent to another during operations like merging — a genuine data-protection feature. The safe student setting: mark your own research files Private or Organizational, and public reference data Public. If you get the cryptic error "the query references other queries or steps, so it may not directly access a data source," mismatched privacy levels are the cause — align them in Data source settings and the error clears.
Refresh planning checklist (fill this in for your project before Chapter 10): for each source, note where it lives (laptop vs. OneDrive vs. database), how often it changes, whose credentials it needs, and whether the Service can reach it. This one-page table prevents nearly every publishing surprise.
Excel workbooks deserve special attention because researchers live in them — and because how the data is stored in the workbook changes the Power BI experience. In the Navigator you will see three kinds of objects:
tbl_Responses. Power BI reads exactly the table's current region — add rows next month and refresh picks them up automatically. Convert every research data sheet to a Ctrl+T table before connecting. It takes ten seconds and eliminates the most common Excel-import headaches.Two more Excel habits: (1) keep one table per sheet, with nothing else on the sheet — no summary calculations beside the data, no second table below; (2) never merge cells in a data table — merged headers become null columns in Power BI. If you receive a workbook that violates these rules (a supervisor's "final_final_v3.xlsx" always does), do the cleanup in Power Query per Chapter 4 rather than asking for a re-export — but do tell the data provider about Ctrl+T for next time.
Power Query is the data-cleaning engine inside Power BI (also available in Excel). When you clicked "Transform Data" in Chapter 3, you opened the Power Query Editor. Its genius is that every action you take — removing a row, fixing a typo, changing a data type — is recorded as a numbered step in the Applied Steps list on the right side of the window. The steps run in order, top to bottom, every time the data refreshes. This means your cleaning is not a one-time chore; it is a documented, repeatable, auditable program.
Behind the steps is a real programming language called M (the Power Query formula language). You will see M code in the formula bar at the top of the editor. You do not need to write M from scratch for this book — the interface writes it for you — but being able to read it helps you diagnose problems, and we will touch a few lines of it by Chapter 12.

When the editor opens, learn its five zones:
SurveyResponses is better than Sheet1.The golden rule: never delete a step casually. Later steps often depend on earlier ones; deleting step 2 of 10 can break steps 3–10. If a step was a mistake, it is safer to right-click it and delete it deliberately, then check the steps after it.
Let us clean our Clean Cooking Survey file. Here is the click path for each operation, in the order a professional would do them.
Step 1 — Promote headers and remove junk rows. Survey exports often have title rows. If row 1 says "Household Cooking Survey 2026" and real headers are in row 2: select the query, Home → Remove Rows → Remove Top Rows → enter 1 → OK. Then Home → Use First Row as Headers. Check: column names should now be HouseholdID, Village, Fuel, MonthlySpend, HHSize, RespSymptoms, SurveyDate.
Step 2 — Set correct data types. This is the most important and most skipped step. Click the small icon at the left of each column header and set: HouseholdID → Text; Village → Text; Fuel → Text; MonthlySpend → Whole Number (or Decimal Number if values have decimals); HHSize → Whole Number; RespSymptoms → Text (we will standardize it next); SurveyDate → Date. Wrong types cause silent disasters: a number stored as text will not sum, and a date stored as text will not sort chronologically. If Power Query shows errors (red rows) after changing a type, the preview tells you exactly which values failed — e.g., "2026-13-01" fails as a Date, which is how we catch the impossible date from Chapter 3.
Step 3 — Standardize text values. Select the Fuel column → Transform tab → Format → Capitalize Each Word, then fix remaining inconsistencies: select the column → Transform → Replace Values → replace "Firewood" variants. Better approach for many variants: right-click the column → Replace Values handles one value at a time, so for "firewood/Firewood/FIREWOOD" you might first apply Transform → Format → lowercase, then Replace "firewood" → "Firewood" once. For Village, do the same ("kotli" → "Kotli"). For RespSymptoms, standardize to "Yes"/"No": lowercase the column, then replace "yes" → "Yes", "no" → "No".
Step 4 — Handle missing and erroneous values. Select MonthlySpend → the blank cell: decide your research rule before you click. Options: (a) leave nulls (Power BI ignores nulls in averages — usually the honest choice); (b) filter them out (Home → Remove Rows → Remove Blank Rows — but this deletes whole respondents, document it); (c) replace with a value such as the median (Transform → Replace Values → replace null — type the word null in "value to find"). There is no universally right answer; there is only the answer you can defend in your methodology section. For the impossible date "2026-13-01": right-click the error cell → you can Remove Errors (Home → Remove Rows → Remove Errors) or replace it with null. Removing one bad row out of 300 is defensible; silently inventing a date is not.
Step 5 — Remove duplicates. Select HouseholdID → Home → Remove Rows → Remove Duplicates. If any rows disappear, you had duplicate submissions (common with online forms). Investigate before deleting: are they true duplicates or two visits to the same household? For our survey, HouseholdID should be unique, so duplicates are data-entry errors.
Step 6 — Split and merge columns. Survey data often packs two facts into one column ("Kotli – H001") or splits one fact across two ("FirstName", "LastName"). Select a column → Transform → Split Column → By Delimiter → choose the delimiter (dash, space, comma). To combine: select two columns (Ctrl+click) → Transform → Merge Columns → choose a separator. For dates stored as text in mixed formats, select the column → Transform → Date → Parse, or use Split Column and rebuild — mixed formats like "12/01/2026" (is that Dec 1 or Jan 12?) are genuinely ambiguous; resolve with the survey team and document the interpretation.
Questionnaires often export in wide format: one column per question, e.g., Q1_FuelCost, Q2_FuelCost, ... or one column per month: Jan_Spend, Feb_Spend, Mar_Spend. Analysis needs long format: one row per household per month, with columns Month and Spend.
The click path: select the columns to unpivot (click the first, Shift+click the last) → Transform tab → Unpivot Columns. Power Query creates two new columns, Attribute (the old column names) and Value (the numbers). Rename them to Month and Spend. This single operation turns an unanalyzable wide table into a clean fact table. If you take one advanced Power Query skill from this book, make it unpivoting — questionnaire data without it is nearly useless in Power BI.
Append stacks tables with the same columns on top of each other (survey round 1 + round 2 + round 3 → one table). Home → Append Queries → choose the queries. Column names must match; mismatches create half-empty columns, which the preview reveals immediately.
Merge joins tables side by side on a key, like a database join (household responses + a village lookup table with district names). Home → Merge Queries → select both queries → click the key column in each (Village) → choose the join kind (Left Outer keeps all rows from the first table — the safe default for research). After merging, click the expand icon on the new column and tick only the columns you need from the second table.
When the preview looks right: Home → Close & Apply. Power Query runs all steps and loads the clean table into the model. Two finishing touches: (1) In Power Query, right-click the query → Properties and write a one-line description ("Cleaned household survey, 298 rows after dedup, see notes 2026-10-08"). (2) Disable loading for helper queries you do not need as tables (right-click → uncheck Enable load) — e.g., a lookup table you only merged from.
Because every step is recorded, your methodology section can now say precisely: "Raw responses (n=300) were processed in Power BI Power Query: top title row removed, headers promoted, data types assigned, text fields standardized to title case, one duplicate HouseholdID removed, one invalid date (2026-13-01) and two blank spending values set to null, and monthly spending columns unpivoted, yielding an analysis table of 298 households." That paragraph is worth its weight in gold at a defense.
You do not need to write M from scratch, but reading the three lines Power Query writes most often will save you when the interface cannot express what you need. Click any step and look at the formula bar:
= Table.RenameColumns(#"Promoted Headers", {{"Village ", "Village"}}) — it says which table, which old name, which new name. If a rename breaks after a source change, you can edit the text directly instead of redoing the step.= Table.ReplaceValue(#"Previous Step", "kotli", "Kotli", Replacer.ReplaceText, {"Village"}) — find, replacement, and the column it applies to. To standardize ten spellings at once, you can duplicate this pattern in the Advanced Editor (Home → Advanced Editor) rather than clicking Replace Values ten times.= Table.AddColumn(#"Previous Step", "FuelCategory", each if [Fuel] = "Firewood" then "Biomass" else "Clean") — the each keyword means "for each row," and [Fuel] refers to the current row's value. This each ... [Column] pattern is 90% of the M you will ever read.The Advanced Editor shows the whole query as one M script — each Applied Step is one line. Before any risky manual edit, copy the entire script into your notes/ file. If your edit breaks the query, paste the backup back. That is version control for Power Query, and it takes ten seconds.
One genuinely useful hand-written M trick: parameterize the source path. In the Advanced Editor, replace the hardcoded file path with a parameter (Home → Manage Parameters → New Parameter, e.g., DataFolder), so moving the project folder means updating one parameter instead of editing every query. Your future self, reorganizing folders the night before submission, will be grateful.
For your research: After this chapter, your cleaning pipeline is also your data-processing audit trail. Export it: in Power Query, right-click each query and review the Applied Steps with your supervisor once. Ask them: "Is setting blanks to null acceptable, or should I exclude those respondents?" Getting this sign-off before analysis prevents the most painful kind of revision — redoing results because the cleaning assumptions were never agreed.
Key takeaways: - Power Query records every cleaning action as a replayable step — your cleaning is a documented program, not a chore. - The standard sequence: remove junk rows → promote headers → set data types → standardize text → handle nulls/errors → deduplicate → split/merge → reshape (unpivot). - Set data types deliberately and investigate every error row; column quality indicators reveal problems the 1,000-row preview hides. - Unpivot wide questionnaire tables into long format; append rounds together; merge lookup tables with a left-outer join. - Every cleaning decision is a methodology decision — document it and get supervisor sign-off.
Here is a truth that separates beginners from competent users: ugly reports with a correct model beat beautiful reports with a broken model. A wrong relationship silently produces wrong totals — and unlike a wrong chart color, nobody can see the error by looking at the page. Every mysterious number in Power BI ("why does the total show 900 when the parts add to 300?") traces back to the model. This chapter gives you just enough modeling theory to build models you can trust, without turning you into a database administrator.
In a well-built model, tables play two roles:
MonthlySpend, HHSize, RespSymptoms, SurveyDate. Facts are usually long (many rows) and narrow-ish, full of numbers and foreign keys.Village (with district, region), Fuel (with fuel category: biomass vs. clean), Date (year, month, quarter). Dimensions are usually short (few rows) and wide-ish, full of text.Why separate them? Because it keeps every definition in one place. If "biomass fuels = firewood + charcoal + kerosene" is defined once in the Fuel dimension, every visual that uses it agrees. If instead you type that logic into five different visuals, they will eventually disagree — and your defense will be the moment someone notices.
In Model view, drag Village from the fact table to Village in the Village dimension. A line appears. That line is a relationship, and it has three properties you must understand:
The click path to inspect: open Model view → click a relationship line → the Properties pane shows cardinality, direction, and active status. Double-click the line to edit. To create: drag a column from one table box to the matching column in another. To delete: click the line, press Delete (then verify totals still work).
Arrange your model so the fact table sits in the center with dimension tables around it like points of a star:
Village
|
Fuel — SurveyResponses — Date
|
(Household attrs)
Each dimension connects directly to the fact with a single-direction one-to-many relationship. Dimensions do not connect to each other. This shape — the star schema — is the single most important modeling pattern in BI, and it exists for good reasons: filter flow is unambiguous, DAX measures behave predictably, and performance is excellent.
The anti-pattern is the snowflake (dimensions chained through other dimensions: Fact → Village → District → Region) and the spaghetti (fact tables joined to each other, both-direction filters everywhere). Snowflakes sometimes happen naturally; Power BI handles small ones fine, but flattening lookups into fewer dimensions keeps life simple. Spaghetti — especially fact-to-fact relationships — is where double-counting lives. If your Model view looks like a spiderweb, rebuild it as a star before building a single visual.
Let us build the star for the Clean Cooking Survey:
SurveyResponses (from Power Query, Chapter 4): HouseholdID, Village, Fuel, MonthlySpend, HHSize, RespSymptoms, SurveyDate, Month (we will add Month in a moment).DimVillage: in Power Query, right-click the SurveyResponses query → Reference (this creates a new query that starts from the cleaned table — edits to the original flow through). Name it DimVillage. Select the Village column → right-click → Remove Other Columns → Home → Remove Duplicates. Optionally merge in a district lookup. Disable nothing — this loads as a small table. Back in Model view, create the relationship DimVillage[Village] (1) → SurveyResponses[Village] (*), single direction.DimFuel: same reference-and-dedupe pattern on the Fuel column, plus a custom column for the fuel category: Add Column → Conditional Column → "If Fuel equals Firewood/Charcoal/Kerosene then 'Biomass' else 'Clean'". Name it FuelCategory. This is the kind of derived classification that belongs in the model, not in five separate visuals.DimDate (calendar table): dates deserve their own dimension because months, quarters, and years are analysis axes. The professional way: Modeling tab → New table and write a small DAX expression generating a date range, or in Power Query create a list of dates and expand year/month/quarter columns. At minimum, ensure SurveyDate is a true Date type, then use Power BI's automatic date hierarchy (Year → Quarter → Month → Day) which appears when you drag a date field into a visual. For serious time analysis, build an explicit calendar table — Chapter 8's time-intelligence measures assume one.When a visual's total looks wrong, work this list in order — it resolves the vast majority of cases:
Two modeling situations confuse every intermediate user; meeting them here inoculates you.
Inactive relationships appear when two tables need two different join paths. Our survey has one date column, but imagine adding FollowUpDate (when a household was revisited). You cannot have two active relationships between SurveyResponses and DimDate — Power BI activates the first and marks the second inactive (dashed line). Inactive relationships are not broken; they are dormant until a DAX measure explicitly calls them with USERELATIONSHIP:
Follow-up Households =
CALCULATE (
COUNTROWS ( SurveyResponses ),
USERELATIONSHIP ( SurveyResponses[FollowUpDate], DimDate[Date] )
)
The pattern: model every date path as a relationship, keep one active, and invoke the others by name in measures. This is far cleaner than duplicating the date table.
Role-playing dimensions are the alternative: instead of one date table with inactive relationships, you create two copies of the dimension (e.g., Survey Date and Follow-up Date, each a reference of DimDate in Power Query) with one active relationship each. Simpler DAX, more tables. For a student model, role-playing dimensions are usually easier to reason about — choose them until your table count gets unwieldy, then graduate to USERELATIONSHIP.
A final modeling hygiene list: hide every key column used only for relationships (right-click → Hide in report view) so report authors use dimensions, not raw keys; set Sort by column for month names (sort MonthName by MonthNumber, otherwise April sorts before January alphabetically); and mark every table with a description. A model where the Fields pane shows only clean, sorted, business-named columns is a model other people can actually use — including your future self.
Chapter 5 prescribed the star schema strictly. Here is the honest nuance: snowflakes (dimension → dimension chains, like Village → District → Region as separate tables) are not evil — they are sometimes the natural shape of reference data, and Power BI handles them correctly. The cost is cognitive: filter paths get longer, DAX gets slightly trickier, and the Model view gets busier. The practical rule: normalize when the lookup is shared or maintained separately (a district table your whole lab uses deserves to be its own table), and denormalize (flatten) when the attribute is used only for slicing one fact (fold District and Region columns into DimVillage — one fewer table, simpler everything). For this book's survey, flatten. If your thesis later involves a proper institutional data warehouse with conformed dimensions, you will meet snowflakes there — and you will understand exactly what they cost and buy. Beginners should also know the term "factless fact table" — a table recording only that an event occurred (household attended a training session: HouseholdID + Date, no measures). It sounds odd, but attendance/coverage analysis runs on factless facts; if your study tracks participation, you will build one.
For your research: Draw your star schema on paper before you build it — boxes for tables, lines for relationships, and one sentence per table saying what one row represents ("one row = one household's survey response"). Show it to your supervisor. This diagram belongs in your thesis methodology chapter, and examiners understand it instantly. A student who can explain their star schema can defend their numbers; a student who cannot is defending on luck.
Key takeaways: - Separate fact tables (measurements) from dimension tables (descriptions); join them in a star schema with the fact at the center. - Relationships must be one-to-many, single-direction, active. Many-to-many and both-direction filters are warning signs — fix the model, do not work around it. - Build dimensions with the reference-and-dedupe pattern in Power Query; add classifications (like fuel category) as dimension columns. - When totals look wrong, diagnose in order: cardinality → direction → blanks → aggregation → raw rows.
Beginners pick a chart type and then look for data to fill it. Professionals do the reverse: they state the question, then choose the visual that answers it with the least effort from the reader. Keep this mapping taped to your monitor:
| Question | Best visual |
|---|---|
| How do categories compare? (fuel types by households) | Clustered bar / column chart |
| How does something change over time? (spending by month) | Line chart |
| What is the single headline number? (avg. monthly spend) | Card |
| What are the exact values behind a summary? | Table |
| How do two dimensions cross? (fuel × village) | Matrix |
| What share does each part hold? (fuel mix) | Donut / pie (use sparingly) |
| Where does it happen? (villages on a map) | Map (filled or bubble) |
| Am I on target? (clean-fuel adoption vs. goal) | KPI visual or Gauge |
A bar chart answers "which is biggest?" at a glance; a table answers "what exactly?" — they serve different readers. Your thesis needs both: the chart for the story, the table for the audit trail.

Let us answer: How many households use each fuel type?
DimFuel and tick Fuel. Power BI drops it into the Y-axis well. Expand SurveyResponses and tick HouseholdID. Power BI puts it in the X-axis well as "Count of HouseholdID" — it auto-aggregates to a count because HouseholdID is text.That is the whole loop you will repeat hundreds of times: select visual type → drag fields into wells → format → title. Every visual in Power BI works this way; only the wells change names.
Line chart — spending trend by month: select the Line chart icon → drag DimDate[Month] (or the SurveyDate hierarchy's Month level) into X-axis → drag SurveyResponses[MonthlySpend] into Y-axis → click the dropdown on the field in the well and change the aggregation from Sum to Average (right question: "average spend per household per month," not total). Format → Markers → On, so each month is a visible dot.
Card — the headline number: select the Card visual → drag MonthlySpend into Fields, set aggregation to Average → Format → Callout value → increase font size, set decimal places to 0. A card should answer one question in under two seconds: "Average monthly fuel spend: Rs 2,850." Add a second card: count of households with respiratory symptoms. These two cards will become the top row of your dashboard (Chapter 12).
Table: select the Table visual → drag in Village, Fuel, MonthlySpend (Average), HouseholdID (Count). Click any column header in the visual to sort. Tables are for exact values and for the "show me the numbers" reader. Keep them narrow — five columns maximum — or they become wallpaper.
Matrix: select the Matrix visual → Rows: DimVillage[Village] → Columns: DimFuel[FuelCategory] → Values: MonthlySpend (Average). You now have a cross-tab: average spend for biomass vs. clean fuels in each village — the classic thesis table, but interactive. Expand/collapse with the +/- icons; turn on Row subtotals and Column subtotals in Format for the margins.
Map: select the Map (or Filled map) visual → drag Village into Location → drag HouseholdID (Count) into Bubble size. Power BI geocodes the village names. Warning: ambiguous place names geocode badly ("Kotli" exists in multiple districts) — verify every bubble sits where it should, and for precise work add latitude/longitude columns to your village dimension and use those instead of names.
KPI: select the KPI visual → Indicator: a measure like clean-fuel adoption rate (Chapter 8) → Trend axis: Month → Target: your goal (e.g., 0.5 for 50%). The KPI shows the value, the trend sparkline, and distance to target in one compact tile — perfect for "are we meeting the program goal?" reporting.
Click a bar in your fuel chart and watch: every other visual on the page filters to that fuel. This cross-filtering is Power BI's superpower — the report is not a set of pictures, it is a linked exploration tool. Click again to clear. As the author, you control this: select a visual → Format → Edit interactions → then click another visual and choose Filter, Highlight, or None. Use None deliberately when cross-filtering would confuse (e.g., clicking a village should not re-filter the village map into meaninglessness). Test every page by clicking each visual and watching what changes — this is part of your quality check in Chapter 9.
HHSize is meaningless; you want Average. Always click the field's dropdown in the well and confirm Sum/Count/Average/Min/Max matches the question.SurveyDate gives Year → Quarter → Month → Day drill levels (great). But mixing a hierarchy axis with non-date categories breaks sorting — keep time axes purely temporal.Once the core visuals are comfortable, these five solve specific research-presentation problems:
RespSymptoms and it reports which factors most increase the likelihood (e.g., "households using charcoal are 2.3× more likely"). Treat its output as hypothesis generation, then verify with proper statistics — but as a discussion starter in a defense, it is unmatched.A word on custom visuals from AppSource (the "…" in the visual gallery): hundreds exist — Gantt charts, word clouds, network diagrams. They are tempting, but each is third-party code with its own quality and (for Service use) certification status. For thesis work, prefer built-in visuals; reach for AppSource only for a chart type Power BI genuinely lacks, and verify it is Microsoft-certified before publishing.
Select a bar or line visual and look at the Visualizations pane: beside the Format (paint roller) icon sits the Analytics icon (a magnifier with a chart). This pane adds analytical overlays without touching your data:
These overlays are presentation-layer only: they do not change measures or filters, so they are safe to experiment with freely.
For your research: For each visual you build, write its question in the title or subtitle: "Average monthly fuel spend by village" beats "Chart1" and forces you to check that the visual actually answers it. When you later write your results chapter, these question-titles become your paragraph topic sentences — the dashboard literally outlines your writing. And never present a visual you cannot explain the aggregation of: if an examiner asks "is this a sum or an average, and over what population?", the answer must be immediate.
Key takeaways: - Start from the question, then pick the visual: bars for comparison, lines for time, cards for headlines, tables for exact values, matrices for cross-tabs. - The build loop is always: choose visual → drag fields into wells → set the right aggregation → format → write a question-based title. - Verify every aggregation (Sum vs. Average vs. Count) — the well dropdown is where silent errors hide. - Cross-filtering makes the page explorable; control it with Edit interactions and test by clicking everything.
Everything in Power BI that narrows the data is a filter, but filters live at three levels, and confusing them causes real mistakes:
The mental model: report ⊃ page ⊃ visual. A visual shows data passing through all three sieves. When a number looks wrong, the Filters pane is the second place to look (after the model, Chapter 5) — a forgotten page-level filter is a classic cause of "where did half my data go?"
There is also a fourth, sneakier filter: the slicer's selection itself, and a fifth: cross-filtering from clicking visuals (Chapter 6). All of them combine. The Filters pane shows their joint effect per visual, which is why learning to read it is a core skill.
A slicer is a visual whose only job is filtering the page. Insert → Slicer (or pick the Slicer icon in the Visualizations pane) → drag DimVillage[Village] into its Field well. You get a list of villages with checkboxes (or a dropdown — change style in Format → Slicer settings → Style). Tick "Kotli" and every visual on the page filters to Kotli. This is how you hand control to your reader: instead of building twelve pages (one per village), you build one page with a village slicer.
Slicer best practices:
- Put slicers in a consistent spot — a slim panel on the left edge or a strip across the top. Readers should never hunt for them.
- Use dropdown style when a slicer has many values (20+ villages); use list or buttons for few values (fuel categories).
- Turn on "Select all" option thoughtfully: for required-choice slicers (one village at a time), consider forcing single-select in Format → Selection → Single select.
- Sync slicers across pages: select the slicer → View tab → Sync slicers pane → tick which pages it appears on. A village slicer synced across all pages makes the whole report feel like one coherent instrument. This single feature elevates a report from "a pile of pages" to "an application."
- Date slicers: drag SurveyDate into a slicer and choose the "Between" style for a date-range slider — ideal for "show me responses from January to March."
Open the Filters pane (View → Filters). For each filter you can set conditions: is / is not, contains, greater than, date ranges, Top N, and for text fields a search box. Two features deserve special attention:
Village into visual-level filters → Filter type: Top N → Top: 5 → By value: drag HouseholdID (Count). This is how you build "top 5 / bottom 5" ranking charts without touching the data.Always label filtered pages honestly. If a page has a page-level filter "FuelCategory = Biomass," the title should say "…among biomass-fuel households." A reader who does not know about the filter will misread every number on the page.
Drillthrough lets a reader right-click a data point and jump to a dedicated detail page filtered to that point. Example: on your summary page, right-click the "Firewood" bar → "Drill through" → "Household Details" → land on a page showing only firewood households in a table.
Setup click path:
1. Create a new page; name it "Household Details." Build a table visual with household-level columns.
2. In the Filters pane, find "Drill through filters on this page" → drag DimFuel[Fuel] into it.
3. Go back to the summary page → right-click any fuel bar → the drillthrough option appears. Power BI passes the filter automatically.
4. Add a Back button on the detail page (Insert → Buttons → Back) so readers can return.
Drillthrough is how you serve two audiences at once: the executive summary reader who never drills, and the examiner who right-clicks the suspicious bar and checks the underlying rows. For a thesis defense, a drillthrough detail page behind every summary chart is quietly powerful — it says "I have nothing to hide; the rows are right here."
We touched Edit interactions in Chapter 6; here is the full audit routine. Select each visual → Format → Edit interactions → click every other visual and set Filter (cross-filter), Highlight (dim the rest), or None. Then perform the filter audit: click through every slicer value and every bar, and watch each visual. Ask three questions: (1) Does every visual respond sensibly? (2) Do the totals still reconcile (sum of parts = whole)? (3) Is there any selection that produces a blank page with no explanation? A blank visual under some filter combination is not a bug in Power BI — it is usually correct (no data matches) — but an unexplained blank looks like an error to a reader. Add a text box note or design the slicer defaults so the landing state always shows data.
Bookmarks (View → Bookmarks pane) capture the state of a page — slicer selections, visual visibility, sort orders. Create bookmark 1: "All villages, bar chart visible." Bookmark 2: "Kotli only, map zoomed." Then add buttons (Insert → Buttons) that jump between bookmarks. This turns your report into a guided narrative: "Click through the story: 1) Overall fuel mix → 2) Kotli deep dive → 3) Spending comparison." For a defense presentation, bookmarks are your slide deck inside the dashboard — no alt-tabbing to PowerPoint, and every "slide" is live data.
Two advanced filtering techniques complete your control over what readers see.
Filter URLs: the Service lets you encode filter selections directly in a report's URL (append ?filter=Table/Column eq 'Value'). This means you can send your supervisor a link that opens the report already filtered to Kotli — no instructions needed ("click the slicer, then…"). The syntax is documented on Microsoft Learn; build the URL by filtering the report manually first, then use the Service's Share → Copy link with the filter applied, which generates it for you. Use this for "here is exactly the view I describe on page 47 of the thesis" links in your appendix.
Default views and personal bookmarks: readers with access can save personal bookmarks (their own saved filter states) without affecting your report — encourage this instead of letting collaborators ask you for "a version filtered to X." And remember that your published bookmarks define the landing state every reader sees first: set the default bookmark to the most representative view (all villages, full date range), never to a narrow slice that could mislead a casual opener.
Reset discipline: after demonstrating filters in a defense or meeting, reset to the default view before moving on. A forgotten "Kotli only" slicer left active while you discuss national-level findings is exactly how miscommunication happens — make resetting a visible, narrated habit ("and now back to the full sample").
Survey data collected over months raises a recurring question: "show me the last 3 months." Hard-coding date ranges in filters means editing the report every month. Relative date filters solve this: in the Filters pane, set a date field's filter type to Relative date — "is in the last 3 calendar months." The window rolls forward automatically on every refresh. Combine with a relative-date slicer (slicer → Filter type → Relative) so readers can switch "last 3 / 6 / 12 months" themselves. Two cautions: (1) relative filters depend on today's date, so a thesis figure captured in October describes a different window than one captured in December — always pair relative filters with a visible "data as of" label (Chapter 9's freshness card); (2) for the frozen thesis appendix, convert relative filters to fixed date ranges so the figure is reproducible years later. Rolling windows for monitoring, fixed windows for publication — that is the discipline.
For your research: Design your report's filter contract and write it down: which slicers exist, which pages they sync to, what the default selection is, and what each drillthrough path shows. Put this contract in your methodology appendix. It does two jobs: it proves to examiners that you controlled the analysis frame (no cherry-picked subsamples hiding behind an undeclared filter), and it lets a future researcher reproduce exactly what you showed. Reproducibility is not just about code — it is about every filter state behind every figure.
Key takeaways: - Filters stack at report → page → visual levels; the Filters pane shows their combined effect — read it before trusting any number. - Slicers hand filtering to the reader; sync them across pages and place them consistently. - Drillthrough pages give summary readers speed and skeptical readers the underlying rows — build both. - Audit every interaction: click everything, reconcile totals, and use bookmarks to turn the dashboard into a guided, defensible narrative.
DAX (Data Analysis Expressions) is the formula language of Power BI's engine — the same language used in Power Pivot for Excel and SQL Server Analysis Services. If Power Query's M language prepares the data, DAX analyzes it. Every total, average, percentage, and year-over-year comparison in your report is a DAX calculation.
The single most important concept in this chapter: a measure is not a value — it is a recipe for a value that is evaluated in context. Write Total Spend = SUM(SurveyResponses[MonthlySpend]) once, and Power BI evaluates it separately for every bar, every slicer selection, every matrix cell. Put it in a bar chart by village and each bar computes its own village's sum; filter to Kotli and the card recomputes for Kotli. You never write the formula twelve times for twelve villages. This "write once, evaluate everywhere" property is what makes DAX powerful — and what confuses spreadsheet users, who expect a formula to live in one cell with one answer.
SpendPerPerson = [MonthlySpend] / [HHSize], or a category label derived from a row's values. Calculated columns increase file size and do not respond to slicers — do not use them for anything that should change with filters.Rule of thumb: if the result should change when the reader clicks a slicer → measure. If it is a fixed property of the row → calculated column.
Right-click the SurveyResponses table in the Fields pane → New measure. The formula bar appears with a placeholder. Type your DAX and press Enter. Rename it immediately (it defaults to "Measure"). Best practice: create a dedicated measure table (Modeling → New table, name it _Measures, define it as = {0} then delete the column — or simply create measures inside it) so all measures live in one findable place instead of scattered across tables.
Measure 1 — Total households:
Households Surveyed = COUNTROWS ( SurveyResponses )
COUNTROWS counts rows in the current filter context. In a card with no filters: 298. In a bar chart by village: each bar's village count. One formula, every context.
Measure 2 — Average monthly spend:
Avg Monthly Spend = AVERAGE ( SurveyResponses[MonthlySpend] )
AVERAGE ignores blank/null values — which is exactly why Chapter 4's decision to leave blanks as null (rather than zero) matters. Nulls excluded: honest average. Zeros included: artificially low average. Your cleaning decision flows directly into your DAX result; document the link.
Measure 3 — Clean-fuel adoption rate:
Clean Fuel % =
DIVIDE (
CALCULATE (
COUNTROWS ( SurveyResponses ),
DimFuel[FuelCategory] = "Clean"
),
COUNTROWS ( SurveyResponses )
)
Three new ideas here. CALCULATE modifies the filter context — here it says "count rows, but only where fuel category is Clean." DIVIDE is safe division: it returns blank instead of an error when the denominator is zero (use it instead of / in every measure). Format this measure as a percentage: select it → Measure tools → Format → Percentage.
Measure 4 — Households with symptoms:
Symptom Households =
CALCULATE (
COUNTROWS ( SurveyResponses ),
SurveyResponses[RespSymptoms] = "Yes"
)
Same CALCULATE pattern, filtering on a fact-table column directly. Compare with Measure 3, which filtered via the dimension — both work; dimension-based filters are cleaner when the category logic lives in the dimension (Chapter 5).
Measure 5 — Year-over-year change (needs a date dimension):
Spend YoY % =
DIVIDE (
[Avg Monthly Spend]
- CALCULATE ( [Avg Monthly Spend], SAMEPERIODLASTYEAR ( DimDate[Date] ) ),
CALCULATE ( [Avg Monthly Spend], SAMEPERIODLASTYEAR ( DimDate[Date] ) )
)
SAMEPERIODLASTYEAR shifts the filter context back one year — but it requires a proper date table marked as a date table (right-click DimDate → Mark as date table → choose the date column). Notice the measure references another measure ([Avg Monthly Spend]) — measures compose, which keeps complex logic readable. With monthly survey data spanning a year, this shows whether spending is rising or falling versus the same month last year.
You need exactly two mental models, and this section is the 80/20:
SUMX. In a calculated column SpendPerPerson = [MonthlySpend] / [HHSize], the row context is the current row.The classic beginner error is using a row-context expression where a filter-context one is needed, or vice versa. When a measure returns the same value in every row of a table visual, you almost certainly have a filter-context problem — the measure is ignoring the visual's axis. CALCULATE is the tool that manipulates filter context; iterators (SUMX, AVERAGEX) create row context inside measures. You do not need to master this today — but when a measure misbehaves, ask: "Is my filter context what I think it is?" and the answer is usually no.
MAX, SELECTEDVALUE, VALUES)./ instead of DIVIDE. Division by zero in one slicer combination produces an error that can blank a whole visual. DIVIDE everywhere.SUM(SurveyResponses[AvgCol]) is meaningless. Averages of averages need AVERAGEX over the right grain — or better, recompute from the base: total spend ÷ households.[Measure Name]; better yet, name measures without ambiguity from the start.Once the first five measures work, these five patterns cover most research-reporting needs:
1. Conditional counting with multiple criteria:
High Spend Biomass HHs =
CALCULATE (
COUNTROWS ( SurveyResponses ),
DimFuel[FuelCategory] = "Biomass",
SurveyResponses[MonthlySpend] > 3000
)
CALCULATE accepts multiple filter arguments — they combine with AND logic. This is how you define study subgroups ("biomass users spending above Rs 3,000") as reusable measures instead of one-off filters.
2. Distinct counts (avoiding double-counting):
Villages Covered = DISTINCTCOUNT ( SurveyResponses[Village] )
Use DISTINCTCOUNT, not COUNTROWS, when the question is "how many different villages" — counting rows would count households. The row-vs-distinct distinction is a classic defense question; knowing which function answers which question is the whole battle.
3. Ratios that need the right grain:
Avg Spend Per Person =
DIVIDE (
SUM ( SurveyResponses[MonthlySpend] ),
SUM ( SurveyResponses[HHSize] )
)
Note this is not the average of the Spend Per Person calculated column — it is total spend divided by total people, which is the correct population-level figure. Averaging per-row ratios gives each household equal weight regardless of size; dividing totals weights by people. Know which one your research question asks for, and state it.
4. Cumulative totals over time:
Cumulative Households =
CALCULATE (
[Households Surveyed],
FILTER (
ALL ( DimDate ),
DimDate[Date] <= MAX ( DimDate[Date] )
)
)
ALL removes the current date filter, FILTER rebuilds it as "everything up to the current date" — the standard running-total pattern. Plot it as a line to show survey progress over the fieldwork period ("we reached 200 households by June").
5. Previous-period comparison for text-safe labels:
Selected Village Label =
SELECTEDVALUE ( DimVillage[Village], "All villages" )
Drop this into a card or title to make the report self-describing: the title reads "Average spend — Kotli" or "Average spend — All villages" depending on the slicer. Small touch, large professionalism payoff, and it directly supports Chapter 11's "what population is this?" defense.
For your research: Every measure is a operational definition of a concept in your study. "Clean-fuel adoption rate" is not just a formula — it is how your thesis defines adoption. Write each measure's definition in plain language in your methodology chapter: "Adoption rate was defined as the proportion of surveyed households reporting LPG or biogas as primary fuel, computed over all valid responses (nulls excluded)." An examiner who can read your DAX and your definition side by side has no room to doubt what you measured. Keep a measure dictionary — a table of measure name, DAX, plain-language definition, and unit — as an appendix. It is one page that dramatically raises the credibility of your quantitative chapter.
Key takeaways:
- A measure is a context-aware recipe: write once, and it evaluates correctly for every bar, slicer, and filter.
- Use measures for aggregations (they respond to filters); calculated columns only for fixed row-level properties.
- CALCULATE changes filter context; DIVIDE prevents divide-by-zero errors; SAMEPERIODLASTYEAR needs a marked date table.
- Every measure operationalizes a research concept — document each as a definition in your methodology, and keep a measure dictionary appendix.
A thesis examiner, a journal reviewer, and a conference audience all do the same thing in the first ten seconds with a figure: decide whether to trust it. That judgment is heavily influenced by visual professionalism — consistent fonts, aligned elements, honest axes, readable colors. This is not vanity; it is communication ethics. A sloppy dashboard suggests sloppy analysis, and a misleading one (truncated axes, cherry-picked colors) is a credibility risk. The good news: professional Power BI design is mostly a short checklist, not artistic talent.
Readers scan a page in a Z-pattern: top-left → top-right → diagonal to bottom-left → bottom-right. Place elements accordingly:
Use alignment and spacing deliberately: select multiple visuals (Ctrl+click) → Format tab → Align (lefts, tops, distribute). Equal-sized cards in a neat row read as "designed"; ragged edges read as "accidental." Turn on gridlines and snap-to-grid (View tab) and leave them on. Leave white space — a page packed edge-to-edge with visuals is unreadable; if everything is emphasized, nothing is.
Work through this list for every page, in order:
MAX(SurveyResponses[SurveyDate])) so readers know the data's vintage.Your thesis needs static figures, and Power BI produces them well: select a visual → … (more options) → Export data gives you the underlying numbers for replotting; for the image itself, use the Service's Export → PowerPoint/PDF, or screenshot at high zoom for crispness. Better: in the Service, Export → PowerPoint embeds the live data behind the slide. Always export from the final filtered state you describe in the caption, and keep the caption's numbers consistent with the figure — a caption saying "n=300" under a figure showing 298 rows is the kind of inconsistency examiners circle in red.
A theme is a small JSON file defining your palette, fonts, and default visual styles — and creating one is easier than it sounds. In Desktop: View → Themes → Customize current theme → adjust colors, then Export to save the JSON. Share that file with your lab and every member's reports match automatically.
A minimal theme palette for research work might be: a dark slate for text/axes, one strong accent (your university color) for the primary series, a muted secondary, a warm highlight for "target/goal" markers, and light grays for backgrounds and gridlines. Define data colors in order — Power BI assigns them to categories in sequence, so put your most important category's color first.
Two theme-adjacent habits multiply the payoff: (1) save a .pbit template (File → Export → Power BI template) containing your theme, page sizes, and standard slicer layouts but no data — every new project starts on-brand in one click; (2) keep the theme JSON in your lab's shared folder with a version number, so a palette change propagates deliberately rather than drifting visual by visual. Consistency across a lab's outputs is not bureaucracy — it is how a research group's work becomes recognizable, and recognizability builds trust with stakeholders who see report after report.
Your dashboard will be consumed in three media, and each punishes different design sins:
Build once for screen, then do a projector pass and a print pass as separate checklist runs. The fifteen minutes each takes is the cheapest insurance against "I can't read this" — the most deflating sentence in any defense.
For your research: Treat each dashboard page as a thesis figure with an interactive appendix. The discipline is the same as academic figure preparation: honest scales, labeled axes, defined populations, and a caption (your text-box insight) stating the finding. When your external examiner asks "how did you produce Figure 4.3?", the answer — "it is a live Power BI visual over the cleaned survey table; here is the measure definition and the filter contract" — is stronger than any static chart's provenance. Design is not the opposite of rigor; in presentation, design is rigor made visible.
Key takeaways: - Layout follows the Z-pattern: title + key finding top-left, KPI strip, main charts, supporting detail; align everything and leave white space. - Restraint in color (3–5 colors, meaningful encoding, color-blind-safe), two fonts max, question-based titles, deliberate number formats. - Run the quality checklist on every page: titles, aggregations, interactions, filters, labels, mobile layout, performance, freshness. - Add text-box insights under charts — they become your results-chapter prose — and export thesis figures from the exact filtered state you describe.
Everything so far lived on your laptop. Publishing moves it to the Power BI Service where others can see it.
Prerequisites: you need (1) a Power BI Service account — sign up at app.powerbi.com with your organizational or university email (personal Gmail is rejected), and (2) to be signed in to Desktop with the same account (top-right corner → Sign in).
The click path: Home tab → Publish → choose a destination workspace (start with My Workspace) → OK. Desktop uploads the .pbix — data model, queries, measures, and report pages together. The upload takes seconds to minutes depending on data size. When it finishes, click the link in the success dialog to open the report in the Service.
What actually got created: in the Service workspace you now have two linked items — a dataset (the model: tables, relationships, measures) and a report (the pages of visuals). Understanding this split matters: you can build multiple reports on one dataset, refresh the dataset on a schedule independently of the report, and control access to each.
My Workspace is personal — only you see it (with a free license, you cannot share from it at all). For collaboration, create a proper workspace: Workspaces → Create workspace → name it (e.g., "Thesis — Clean Cooking Study") → set it up. Workspaces hold datasets, reports, and dashboards together, and access is managed per workspace: Admin, Member, Contributor, Viewer roles. Give your supervisor Viewer (can view and interact, cannot edit), a co-author Contributor (can edit reports), and keep Admin for yourself. This role model is how you share without losing control — nobody can accidentally rewrite your model if they are only a Viewer.
Your published dataset is a snapshot — it does not update itself until you configure refresh. Two mechanisms:
Refresh failures are the most common Service headache. When a refresh fails, the Service emails you with an error. The usual causes: the source file was moved/renamed, credentials expired (for databases), or a Power Query step broke on new data (e.g., a new fuel spelling). Fix it in Desktop, republish, and re-run refresh. Always check the refresh history (dataset → Refresh history) after changing anything upstream.
With Pro (or PPU), sharing options in a workspace:
Sharing etiquette for research: share the report, not the raw dataset, when the underlying rows are sensitive (household-level survey data often is). Use row-level security (RLS) if different people should see different slices — e.g., field coordinators see only their own district. RLS is defined in Desktop (Modeling → Manage roles) and enforced in the Service. Even a simple "supervisor sees all, district coordinators see their district" setup demonstrates serious data governance to an ethics committee.
In Power BI terminology, a report is multi-page and built in Desktop; a dashboard is a single-page collage built in the Service by pinning visuals from reports (hover a visual → pin icon → pin to dashboard). Dashboards can mix visuals from multiple reports and datasets, show live tiles, and are the classic "executive overview" surface. For your study: keep the detailed multi-page analysis as a report, and pin the 6–8 headline tiles (the KPI cards, the fuel-mix bar, the trend line) into a one-page dashboard for quick briefings. Chapter 11 designs this dashboard deliberately.
Publishing is not the end of collaboration — the Service keeps working for you after the report is live.
Subscriptions: any viewer can subscribe to a report or dashboard (Subscribe → set schedule) and receive scheduled email snapshots — a PDF or PNG of the page in their inbox daily or weekly. For a supervisor who will not log in to check, a Monday-morning dashboard email keeps them effortlessly current during fieldwork. As the author, you can subscribe them (with Pro) so they do not have to set it up.
Data alerts: on dashboard tiles (cards, KPIs, gauges), viewers can set alerts — "email me if Symptom Rate exceeds 40%." For a longitudinal study, an alert on a key indicator turns the dashboard into a monitoring instrument: you hear about the problem when the data crosses the line, not at the next meeting. Set alerts on your own KPIs first to learn the mechanics, then offer them to stakeholders.
Comments: reports support threaded comments pinned to specific visuals — your supervisor can ask "why does Kotli spike here?" directly on the chart, and you reply in context. This beats a separate email thread where "the third chart on page 2" is ambiguous. Resolve comment threads as you address them; an inbox-zero comments panel is part of shipping.
Together these three features close the loop: publish → stakeholders get scheduled snapshots → alerts flag changes → comments capture questions → you iterate in Desktop and republish. That loop, running quietly in the background of your write-up months, is the real return on the hours you invested in Chapters 2–9.
When two or more people build on the same dashboard — you plus a co-author, or a lab with several projects — editing the live report directly becomes risky. Power BI's deployment pipelines (Premium/PPU feature; check whether your university's capacity includes it) formalize a three-stage flow: Development (where you experiment), Test (where your supervisor reviews), and Production (the stable version stakeholders see). You deploy forward stage by stage, and each stage keeps its own data-source connections — so Test can point at a sample dataset while Production refreshes from the real one.
Most student projects do not need the full machinery, but adopt its discipline with a poor-man's version: keep three workspaces (Thesis-Dev, Thesis-Review, Thesis-Final), develop in Dev, copy the .pbix to Review for supervisor feedback, and publish to Final only when a milestone is signed off. Never edit Final directly — every change flows Dev → Review → Final. This single habit prevents the classic disaster of "I was fixing a typo and broke the defense dashboard," and it gives you a clean answer to "which version did the committee see?" — the one in Final, archived as PDF, on the date in question.
For your research: Decide your dissemination plan before you publish: Who gets access (supervisor? committee? public after defense)? At what granularity (full report? one-page dashboard? static PDF export)? On what timeline (live during write-up? frozen snapshot archived with the thesis)? A frozen, exported PDF of the final dashboard belongs in your thesis appendix as the citable record; the live dashboard serves the defense and ongoing collaboration. Write this plan down — ethics committees and supervisors both ask "who can see the data?", and this is your answer.
Key takeaways: - Publish from Desktop (Home → Publish) to a workspace; the Service splits your upload into a refreshable dataset and a viewable report. - Use real workspaces with roles (Viewer for supervisors); My Workspace is personal and unshareable on free licenses. - Keep source files in OneDrive/SharePoint for gateway-free scheduled refresh; monitor refresh history. - Share deliberately: reports for readers, workspace roles for teams, row-level security for sensitive slices — and never Publish-to-web with real research data.
A business dashboard answers "how is the company doing?" A research dashboard answers "what did the study find, and can I trust it?" The audience is different — supervisors, examiners, reviewers, stakeholders — and so is the contract. Every number must be traceable to a defined population, every filter state must be declared, and the narrative must survive hostile questions. This chapter turns the report-building skills of Chapters 6–9 into a dashboard that can stand up in a defense.
A research dashboard is one page (or one page plus drillthrough detail). That constraint forces the hardest and most valuable decision: what are your 5–7 headline findings? For the Clean Cooking Survey, ours might be:
Each finding becomes one tile: a card, a bar, a line, a map. If a finding does not fit in one tile, it is two findings. Write your findings as sentences first, then build tiles — never the reverse.
Follow this proven layout top to bottom:
Pin these tiles from your report into a Service dashboard (Chapter 10.5) for the briefing version, and keep the full multi-page report behind it for the deep dive.
A dashboard without words is a Rorschach test — every reader sees a different story. Add text boxes with: (1) the finding in one sentence, (2) the population ("among biomass-fuel households"), and (3) the comparison ("vs. 28% in January"). Use Power BI's Smart narrative visual (Insert → Smart narrative) to auto-generate a textual summary that updates with filters — it writes sentences like "Average spend was highest in Kotli at Rs 3,400" and recomputes when slicers change. Review and edit its output; auto-text is a draft, not a publication. For key charts, add annotations: a line marking a policy date ("LPG subsidy introduced — March 2026") on the trend chart turns a wiggle into an explanation.
Before your defense, attack your own dashboard the way an examiner would:
A dashboard that displays human-subjects data carries obligations a business dashboard does not. Work through these before sharing anything beyond your supervisor:
None of this is bureaucracy for its own sake — it is the same research-ethics reasoning your proposal already passed, extended to the new medium. An examiner who sees a governance note in your methodology footer does not think "overkill"; they think "this researcher is careful."
The dashboard is built; now it must become prose. Work tile by tile through your one-page dashboard, and for each tile write one paragraph following this template:
Note what the template enforces: every claim carries its denominator, every number matches the tile exactly, and interpretation stays inside what descriptives can support. Copy each tile's insight text box (Chapter 9) as the paragraph's starting draft — you wrote those sentences when the finding was fresh, which is when they were most accurate. Number the exported figures to match the thesis (Figure 4.1, 4.2…), store the exports in a figures/ folder with the filter state recorded in each filename (fig4-1_fuel-mix_all-villages_2026.png), and cross-check every in-text number against the figure one final time before submission. The dashboard-to-paper pipeline, run this way, makes numerical inconsistency — the most common and most embarrassing thesis error — nearly impossible.
6. "Can I reproduce this?" The .pbix, the raw CSVs, the query steps, and the filter contract — the full audit trail from Chapters 3–7.
Project the dashboard, not slides, for your results section. Use bookmarks (Chapter 7) as your talking points: click "Finding 1," tell the story, click "Finding 2." When an examiner interrupts with "what about village X?", you do not fumble for a backup slide — you click the slicer and answer from live data. That moment, handled calmly, is worth more than ten polished slides. Rehearse the three most likely hostile questions with the dashboard open, and know exactly which slicer or drillthrough answers each.
For your research: Your dashboard is the visual abstract of your thesis. Write the one-page dashboard before you write the results chapter: the discipline of choosing 5–7 findings and stating each in one sentence gives you the chapter's skeleton. Many students discover, while building the dashboard, that two of their "findings" are the same finding, or that a claimed pattern vanishes under a different filter — that discovery during building is infinitely cheaper than discovering it during the defense Q&A.
Key takeaways: - A research dashboard is one page, 5–7 findings, each stated as a sentence before it becomes a tile. - Structure: provenance header → KPI strip → evidence charts with insight text → depth row (matrix, map, drillthrough) → methodology footer. - Annotate with narrative: insight sentences, Smart narrative drafts you review, event markers on trends. - Make it defensible: denominators everywhere, drillthrough to rows, live slicer demos, the measure dictionary at hand, honest limits of descriptive analysis — and a PDF backup for demo day.

You now have every skill. This chapter strings them together into one continuous build, start to finish, with nothing skipped. Set aside two to three uninterrupted hours. By the end you will hold a published dashboard and a complete audit trail — the full pipeline from raw CSV to shareable evidence.
Starting materials: two CSV files in your project data/ folder — survey_round1.csv (Jan–Jun 2026, ~150 rows) and survey_round2.csv (Jul–Dec 2026, ~150 rows), in the messy format of Chapter 3 (inconsistent capitalization, a few blanks, one bad date, some duplicate IDs across rounds). If you have been following along, these are your files; if not, create them now from the Chapter 3 sample pattern.
data/ → OK. The preview lists both CSVs.Fuel and Village, handle the blank spends (nulls) and the bad date (null), remove duplicate HouseholdIDs.SurveyResponses, add a query description, Close & Apply.Checkpoint: Data view shows one clean table, ~298 rows, correct types. If the count is off, click through Applied Steps to find where rows were lost.
DimVillage: right-click SurveyResponses → Reference → keep only Village → Remove Duplicates → rename query. Add a District column via Merge with a small village_lookup.csv (left outer join), or via a conditional column if you know the mapping.DimFuel: reference → keep Fuel → dedupe → Add Column → Conditional Column → FuelCategory ("Biomass" for Firewood/Charcoal/Kerosene, else "Clean").DimDate: Modeling → New table → build a calendar covering 2026-01-01 to 2026-12-31 with Year, Quarter, MonthNumber, MonthName columns → right-click → Mark as date table.DimVillage[Village] 1 → * SurveyResponses[Village]; DimFuel[Fuel] 1 → * SurveyResponses[Fuel]; DimDate[Date] 1 → * SurveyResponses[SurveyDate]. All single-direction. Confirm no many-to-many, no dashed inactive lines.Village/Fuel columns in the fact table so authors always use the dimensions.Checkpoint: Model view shows a clean three-point star. Write the one-sentence-per-table definitions in your notes.
Create a _Measures table and add the five measures from Chapter 8: Households Surveyed, Avg Monthly Spend, Clean Fuel %, Symptom Households, plus a symptom-rate measure:
Symptom Rate = DIVIDE ( [Symptom Households], [Households Surveyed] )
and a spend-per-person calculated column in the fact table:
Spend Per Person = DIVIDE ( SurveyResponses[MonthlySpend], SurveyResponses[HHSize] )
Format: percentages as %, currency as whole numbers. Build a table visual with Village on rows and all measures as values — verify every number by spot-checking two villages against filtered Data view rows.
Checkpoint: the table's grand total row reconciles; percentages are between 0 and 100%; no divide-by-zero errors under any slicer combination you can think of.
Build three pages:
Page 1 — "Overview" (the dashboard page): title band with study name, n, and date range. KPI strip: Households Surveyed, Clean Fuel %, Avg Monthly Spend, Symptom Rate cards. Slicers: Village (synced to all pages), FuelCategory, date-range slider. Evidence: bar chart "Households by fuel type," line chart "Clean-fuel adoption % by month," map of villages sized by households. One insight text box per chart.
Page 2 — "Spending analysis": matrix of Village × FuelCategory with average spend; bar chart "Average spend by village" sorted descending; card showing max-village vs min-village gap. Page-level filter: none — let slicers do the work.
Page 3 — "Household details" (drillthrough target): table with HouseholdID, Village, Fuel, MonthlySpend, HHSize, RespSymptoms. Add drillthrough filters for Fuel and Village. Hide this page from navigation. Add Back buttons.
Run the full Chapter 9 quality checklist and the Chapter 7 filter audit on every page.
pbix/clean-cooking-dashboard-v1.pbix.notes/ as the frozen citable record.You now own a complete, refreshable, shareable research-data pipeline: raw CSVs → documented Power Query cleaning → star-schema model → DAX measures → interactive report → published dashboard with scheduled refresh. New survey responses dropped into the OneDrive folder flow through the entire pipeline untouched by hand. That is not a student exercise — it is professional-grade BI, and it is exactly the artifact that separates a thesis with "tables pasted from Excel" from one with a living evidence base.
Next steps beyond this book: learn DAX iterators (SUMX, AVERAGEX) for weighted calculations; explore calculation groups for consistent time intelligence; try Power BI's AI visuals (Key influencers, Decomposition tree) for exploratory analysis of why patterns occur; connect Python/R visuals for custom statistics inside the dashboard; and study deployment pipelines if your lab runs dev/test/prod workspaces. The Definitive Guide to DAX (see References) is your next book.
Even a careful build hits snags. Here are the five you are most likely to meet in this capstone, with the fix for each:
SurveyDate in the fact is text, or the relationship to DimDate is inactive. Fix: verify the column type is Date in Power Query, verify the relationship line is solid (active) in Model view, and confirm DimDate is marked as the date table.COALESCE([Measure], 0) only when zero is truly the right interpretation. Document the choice.Work each problem with the diagnostic habits from Chapters 5 and 8: check the model first, then the filters, then the rows. The capstone is not just a build exercise — it is where those habits become reflexes.
Finish by demonstrating your dashboard to someone — a peer, a supervisor, a study group. Use this script:
Then invite the hardest question in the room and answer it with a slicer. That moment — a live answer from real data — is the entire point of this book.
For your research: The capstone is a rehearsal for your real thesis pipeline. Replace the survey CSVs with your actual data files and repeat these six phases — you already know every click. Time-box each phase as listed; if a phase overruns, it is telling you where your real data is messiest, which is itself a methodology insight worth writing down. When your supervisor asks "how long until the dashboard is ready?", your answer is now an evidence-based estimate, not a guess.
Key takeaways: - The end-to-end pipeline: Folder-connect → clean once in the sample query → star-schema model → DAX measures → three report pages → publish → scheduled refresh → pinned dashboard → shared + PDF archived. - Checkpoints after every phase catch errors where they are cheap. - Source files belong in OneDrive/SharePoint before publishing so refresh works without a gateway. - Ship the audit trail with the dashboard: methodology paragraph, filter contract, measure dictionary. That trail is what makes the work defensible.
Keep this section open in a second tab while you work through the book — it is the quick-reference companion to the twelve chapters. The visual chooser answers "which chart?", the Power Query table answers "how do I fix this?", the sharing comparison answers "how do I distribute this?", the DAX table answers "which function?", the error decoder answers "what went wrong?", and the workflow map answers "where am I in the project?" Print these pages and pin them above your desk; experienced Power BI users still consult cheat sheets daily, and there is no prize for memorizing what a reference table holds better.
| If your question is… | Use this visual | Key well settings | Watch out for |
|---|---|---|---|
| Which category is biggest/smallest? | Clustered bar chart | Category on axis, measure on values, sort descending | Start axis at zero; ≤10 categories |
| How does it change over time? | Line chart | Date on X-axis, measure on Y, markers on | Keep axis purely temporal; don't mix hierarchies |
| What's the headline number? | Card | Single measure, large callout value | One number per card; format units |
| Am I on/off target? | KPI visual | Indicator measure, trend axis, target value | Needs a real target, not a guess |
| What are the exact values? | Table | ≤5 columns, sortable headers | Wide tables become wallpaper |
| How do two dimensions cross? | Matrix | Rows + columns + values, subtotals on | Check the aggregation of the values |
| What share of the whole? | Donut chart | 2–4 categories max | Never for many categories; bars compare better |
| Where does it happen? | Map (bubble/filled) | Location + size; lat/long preferred | Verify geocoding; ambiguous names misplace |
| Why is this happening? | Key influencers / Decomposition tree | Categorical explainers + numeric measure | Exploratory only; validate statistically |
| What does the text say? | Smart narrative | Auto-summary of the page's visuals | Edit the draft; don't publish raw output |
| Messy-data symptom | Power Query fix | Where to click |
|---|---|---|
| Title rows above headers | Remove Top Rows → Use First Row as Headers | Home tab |
| Numbers stored as text / dates as text | Set data type via column header icon | Column header icon |
| "Kotli" vs "kotli" vs "KOTLI" | Format → lowercase, then Replace Values | Transform tab |
| Blank cells in numeric column | Decide: keep null / remove rows / replace value | Right-click column |
| Impossible values (month 13) | Inspect error rows → Remove Errors or set null | Home → Remove Rows |
| Duplicate submissions | Remove Duplicates on the ID column | Home → Remove Rows |
| Two facts in one column | Split Column → By Delimiter | Transform tab |
| Two columns that belong together | Merge Columns (Ctrl+click both) | Transform tab |
| One column per month/question (wide) | Unpivot Columns | Transform tab |
| Monthly files to combine | Folder connector → Combine Files | Get data → Folder |
| Add reference table (districts) | Merge Queries → Left Outer → Expand | Home tab |
| Only see 1,000 rows in preview | View → Column quality / Column profile | View tab |
| Option | Audience | License needed | Data visibility | Best for |
|---|---|---|---|---|
| My Workspace (unshared) | Just you | Free | Private | Drafting and learning |
| Workspace + Viewer role | Supervisor, committee, team | Pro (both sides, usually) | Controlled, login required | Thesis collaboration |
| Direct report sharing | Named individuals | Pro | Controlled link | One-off reviews |
| Publish to web (public) | Anyone on the internet | Free | Fully public — no login | Demos and teaching only; never real data |
| Export to PDF / PowerPoint | Anyone you send the file | Free | Frozen snapshot in the file | Thesis appendix; defense backup |
| Embed in SharePoint/Teams | Organization members | Pro / Premium | Inside institutional walls | Departmental reporting |
| Function | What it does | Example pattern |
|---|---|---|
SUM / AVERAGE / COUNTROWS |
Basic aggregation in filter context | Avg Monthly Spend = AVERAGE(SurveyResponses[MonthlySpend]) |
CALCULATE |
Evaluates an expression under modified filters | CALCULATE(COUNTROWS(SurveyResponses), DimFuel[FuelCategory]="Clean") |
DIVIDE |
Safe division (blank on divide-by-zero) | DIVIDE([A],[B]) — always prefer over / |
SAMEPERIODLASTYEAR |
Shifts dates back one year (needs date table) | CALCULATE([Measure], SAMEPERIODLASTYEAR(DimDate[Date])) |
SUMX / AVERAGEX |
Row-by-row iteration inside a measure | SUMX(SurveyResponses, [MonthlySpend]/[HHSize]) |
FILTER |
Returns a filtered table for iterators/CALCULATE | CALCULATE([M], FILTER(DimVillage, [District]="Kotli")) |
SELECTEDVALUE |
The single selected value, or blank/alternate | SELECTEDVALUE(DimVillage[Village], "All villages") |
MAX / MIN |
Latest/earn date or extreme value | MAX(SurveyResponses[SurveyDate]) for "data as of" |
| Error message (paraphrased) | What it usually means | Fix |
|---|---|---|
| A single value for column X cannot be determined | You used a bare column where one value was expected | Wrap in an aggregator: MAX, MIN, or SELECTEDVALUE |
| Function DIVIDE expects… / division by zero | A / hit a zero denominator in some filter context |
Replace / with DIVIDE |
| The expression refers to multiple columns… | A measure returned a table where a scalar was needed | Check for a missing aggregator or misplaced FILTER |
| Column 'X' cannot be found | Renamed/removed column, or wrong table prefix | Check the Fields pane name; fix the reference |
| SAMEPERIODLASTYEAR returned blank | No marked date table, or gaps in the date column | Mark as date table; ensure continuous dates |
| Circular dependency detected | Two calculated columns/measures reference each other | Break the cycle: compute one from base columns |
| The query exceeded available resources | Cartesian explosion — usually a bad many-to-many | Fix the relationship cardinality first |
| Stage | Book chapter | Your deliverable | Done when… |
|---|---|---|---|
| Plan | 1 | Dataset inventory + sharing plan | Every file listed; license confirmed |
| Set up | 2 | Project folder, versioned .pbix, options set | Folder structure + notes file exist |
| Connect | 3 | Saved queries to all sources | Refresh re-runs cleanly |
| Clean | 4 | Applied Steps audit trail | Methodology paragraph drafted |
| Model | 5 | Star schema diagram | All 1:*, single-direction; totals reconcile |
| Visualize | 6 | Draft report pages | Every visual has a question-title |
| Interact | 7 | Slicers, drillthrough, bookmarks, filter contract | Filter audit passed |
| Measure | 8 | Measure dictionary | Every number has a defined DAX + definition |
| Design | 9 | Quality checklist passed; mobile layout | Projector + print passes done |
| Publish | 10 | Workspace, scheduled refresh, shared report | Supervisor can open; refresh history green |
| Report | 11 | One-page research dashboard + PDF | 5–7 findings, denominators everywhere |
| Ship | 12 | Archived PDF + raw files + notes | Reproducible by a stranger |
data/, pbix/, and notes/ subfolders.Jan_Spend, Feb_Spend, Mar_Spend plus HouseholdID. Unpivot it into Month/Spend long format and verify the row count triples (minus headers).DimVillage and DimFuel via reference-and-dedupe, add a FuelCategory conditional column, and wire a three-table star schema with single-direction one-to-many relationships. Screenshot Model view.[1] M. Ferrari and A. Russo, The Definitive Guide to DAX: Business Intelligence for Microsoft Power BI, SQL Server Analysis Services, and Excel, 2nd ed. Redmond, WA, USA: Microsoft Press, 2019.
[2] M. Ferrari and A. Russo, Analyzing Data with Power BI and Power Pivot for Excel. Redmond, WA, USA: Microsoft Press, 2017.
[3] A. Ferrari and M. Russo, Introducing Microsoft Power BI. Redmond, WA, USA: Microsoft Press, 2016.
[4] R. Collie and A. Singh, Power Pivot and Power BI: The Excel User's Guide to DAX, Power Query, Power BI & Power Pivot in Excel 2010-2016. Uniontown, OH, USA: Holy Macro! Books, 2015.
[5] M. Webb, Power Query for Power BI and Excel. New York, NY, USA: Apress, 2014.
[6] B. Powell, Mastering Microsoft Power BI: Expert Techniques for Effective Data Analytics and Business Intelligence. Birmingham, UK: Packt Publishing, 2018.
[7] D. Knight, B. Knight, M. Davis, and P. Rockwell, Microsoft Power BI Complete Reference: Bring Your Data to Life with the Powerful Features of Microsoft Power BI. Birmingham, UK: Packt Publishing, 2018.
[8] S. Few, Information Dashboard Design: Displaying Data for At-a-Glance Monitoring, 2nd ed. Burlingame, CA, USA: Analytics Press, 2013.
[9] E. R. Tufte, The Visual Display of Quantitative Information, 2nd ed. Cheshire, CT, USA: Graphics Press, 2001.
[10] Microsoft Learn, "Power BI documentation," Microsoft, 2024. [Online]. Available: https://learn.microsoft.com/en-us/power-bi/
End of Book 23. Next: Book 24 — Data Visualization Principles for Research Communication.