Cover of Collect Transform and Combine Data Using Power BI and Power Query in Excel by Gil Raviv, featuring abstract data-flow shapes

Pages

368

Published

2018

Power BI and DAX ✨ New

Collect, Transform and Combine Data Using Power Bi and Power Query in Excel

A hands-on guide to data transformation workflows in Power BI and Power Query for Excel

Master the full data-preparation pipeline β€” from raw source to clean, combined dataset β€” so your DAX models are built on solid ground.

Before a single DAX measure runs, your data has to be collected, shaped, and combined. Gil Raviv's hands-on guide walks through Power Query in both Power BI and Excel, covering every stage of the transformation pipeline: connecting to sources, cleaning messy data, restructuring tables, and merging disparate datasets into a single, reliable model ready for analysis.

About this book

Every Power BI report and every DAX calculation depends on one thing: clean, well-structured data. Most tutorials skip past that dependency. This book does not.

Gil Raviv β€” a longtime Microsoft MVP and practitioner β€” built this guide around the reality that data preparation is where projects succeed or fail. Power Query is the tool, and this book is the complete practical reference for it, covering both Power BI Desktop and the Power Query add-in for Excel so you can apply the skills wherever your team works.

You will start by understanding how Power Query fits into the modern self-service analytics stack. From there, each chapter adds a concrete skill: connecting to flat files, databases, and web sources; applying transformations that survive refresh; reshaping wide tables and unpivoting survey-style data; writing M expressions to handle edge cases your UI clicks cannot reach; and combining queries through append and merge operations that mirror real business data structures.

The book does not treat data preparation as a chore to endure before the real analysis begins. It treats it as a discipline with its own logic β€” one that, done well, makes every downstream DAX model faster to build, easier to audit, and more reliable in production.

  • Step-by-step walkthroughs of every major Power Query transformation
  • Real-world examples drawn from business scenarios analysts actually face
  • Coverage of both Power BI Desktop and Excel Power Query side by side
  • Practical M formula guidance without requiring a programming background
  • Strategies for combining multiple data sources into a single coherent model

If you have been writing DAX measures on top of data you are not fully confident in, this book is the place to fix that foundation. 368 pages, published April 2018 by Pearson Professional.

🎯 What you'll learn

  • Connect Power Query to flat files, databases, folders, and web-based sources without writing connection strings by hand
  • Apply transformations β€” type conversion, splitting, filtering, replacing values β€” that remain stable across every scheduled refresh
  • Unpivot and reshape tables that arrive in wide or pivot format into the normalized structure DAX models require
  • Write M expressions to handle conditional logic and edge cases that the graphical interface cannot cover
  • Merge queries using different join types to replicate lookup and relationship logic at the query layer
  • Append multiple tables from different periods or regions into a single consolidated dataset
  • Audit and optimize query steps so performance does not degrade as data volumes grow
  • Build a complete, refreshable data model in Power BI and Excel from raw sources to report-ready tables

πŸ‘€ Who is this book for?

  • Excel power users who want to move their data-preparation work into Power Query and stop relying on brittle spreadsheet formulas
  • Power BI report authors who know enough DAX to be dangerous but struggle when the source data arrives in poor shape
  • Business analysts who import data from multiple systems and spend too much time manually reconciling it before any analysis can begin
  • Data professionals transitioning from traditional ETL tools who want to understand the self-service Power Query equivalent
  • BI developers responsible for maintaining refreshable reports who need their queries to be robust and auditable

Table of contents

  1. 01

    Power Query in the Analytics Stack

    Understand where Power Query fits within Power BI and Excel and why data preparation is a distinct discipline from data modeling. You will set up your environment and run your first query.

  2. 02

    Connecting to Data Sources

    Connect to the most common source types β€” CSV and Excel files, SQL databases, web pages, and folders of files β€” and learn how Power Query manages connection credentials and refresh settings.

  3. 03

    Essential Transformations

    Apply the core row and column operations: filtering, sorting, renaming, changing data types, splitting columns, and replacing values. You will build transformation sequences that stay reliable across refreshes.

  4. 04

    Reshaping and Unpivoting Data

    Turn wide pivot-style tables into normalized structures by unpivoting columns, transposing tables, and promoting headers. These techniques handle the survey and report exports that most analysts dread.

  5. 05

    Writing M Expressions

    Move beyond what the graphical editor generates and write M code directly to handle conditional logic, custom column formulas, and edge cases the UI cannot reach.

  6. 06

    Combining Queries with Merge

    Join two queries together using inner, left-outer, and anti-join merge types to replicate lookup logic and enrich one table with columns from another.

  7. 07

    Appending and Consolidating Data

    Stack multiple tables from different time periods, regions, or files into a single consolidated query, including techniques for dynamically pulling all files from a folder.

  8. 08

    Query Management and Performance

    Organise queries into groups, control which queries load to the data model, and identify slow steps so your solution performs well as data volumes scale.

  9. 09

    Building the Complete Data Model

    Bring every skill together to build a full, refreshable data model in both Power BI Desktop and Excel, ready to support DAX measures and dashboard reports.

Frequently asked questions

Do I need prior experience with Power BI or Excel to read this book?

Familiarity with Excel is assumed. You do not need prior Power Query experience, but some exposure to Power BI Desktop will help you follow the Power BI-specific examples more quickly.

Does the book cover Power BI Desktop, Excel, or both?

Both. Gil Raviv covers Power Query as it appears in Power BI Desktop and in the Excel add-in side by side, so the skills transfer regardless of which tool your team uses.

Is this book about DAX or about data preparation?

It is focused entirely on data collection, transformation, and combination β€” the stage before DAX. It pairs well with a dedicated DAX resource but does not teach DAX itself.

The book was published in 2018. Is it still relevant?

The core Power Query concepts and M language covered here remain stable. Some UI details and connector options have evolved, but the transformation patterns and methodology hold up well for current versions of Power BI and Excel.

Do I need to write code to follow the examples?

No programming background is required. The book introduces M formula syntax gradually and in the context of real scenarios, so you learn it as a natural extension of the visual editor rather than as a separate coding skill.

You might also like

πŸ“¬ Weekly Newsletter

Stay ahead of the curve

Get the best programming tutorials, data analytics tips, and tool reviews delivered to your inbox every week.

No spam. Unsubscribe anytime.