# Prepare reliable Power BI data with Power Query and Applied Steps Inspect types before aggregation, separate errors from nulls and zeros, and gate the applied query on row counts, key uniqueness and control totals. - Canonical: https://satracking.net/guides/power-query-data-preparation/ - Language: en - Category: platforms - Level: intermediate - Published: 2026-11-13 - Updated: 2026-11-13 --- ## Audience and learning objectives Inspect types before aggregation, separate errors from nulls and zeros, and gate the applied query on row counts, key uniqueness and control totals. You will learn to inspect a source before modeling it, use the Applied Steps history as a reviewable transformation sequence, and handle errors without silently changing business meaning. Skill: intermediate. Reading time: eight minutes. ## 1. Treat import as a controlled pipeline The source workshop uses a CSV dataset to demonstrate the workflow. The important lesson is not the specific file format: it is that source data should be checked before visuals are built. A reliable sequence is: 1. Connect to the source and select the intended table or file. 2. Inspect column names, sample values and detected data types. 3. Correct types that do not match the field's meaning. 4. Resolve malformed or missing values using an explicit rule. 5. Rename, remove or derive columns to create a usable analytical shape. 6. Review the resulting steps and apply the query. 7. Refresh from the source and verify that the same rules still work. Do not begin by building visuals on top of an unreviewed import. A chart can render successfully while the underlying values are typed or interpreted incorrectly. ## 2. Validate data types before aggregation A number stored as text may sort alphabetically, fail arithmetic, or be excluded from numeric aggregation. A date stored as text may not behave as a date axis. Check the type against the business meaning, not just the appearance of the values. | Example field | Expected type | Validation question | |---|---|---| | `year` | Whole number or date, depending on the model | Is it a year label or a full date? | | `life_exp` | Decimal number | Are decimal values parsed consistently? | | `population` | Whole number | Are separators and large values interpreted correctly? | | `country` | Text | Are labels stable and consistently spelled? | | `latitude`, `longitude` | Decimal number | Are signs and decimal separators correct? | The source workshop specifically identifies a life-expectancy field imported as text and demonstrates changing its type before analysis. Apply the same discipline to every important measure and grouping field. ## 3. Understand the Applied Steps list Power Query records transformations as ordered steps. The Applied Steps list is not just an undo history: it is a compact explanation of how the source becomes the table used by the model. - Selecting a step lets you inspect the intermediate result. - Renaming a column makes later steps and report fields easier to understand. - Removing unused columns reduces clutter and can reduce unnecessary model data. - Replacing values should be based on a documented mapping, not guesswork. - A step that depends on a column name can fail when the source schema changes. When a step fails, inspect the first failing step and its inputs. Do not delete several later steps just to make the warning disappear; that can conceal the original cause. ## 4. Distinguish errors, nulls and valid zeroes These values mean different things: - **Error**: Power Query could not evaluate or convert a value. - **Null / blank**: the source has no value, or the transformation intentionally produced one. - **Zero**: a numeric value with a real business meaning. Replacing every error or blank with zero can distort averages, rates and totals. For example, an unknown population is not a population of zero. Define the treatment field by field: correct the source, map a known invalid code, keep a null, remove a record only with a defensible rule, or quarantine it for review. Microsoft distinguishes step-level errors, which can prevent a query from loading, from cell-level errors that affect particular values. Diagnose the level before deciding how to repair it. ## 5. Use a practical quality gate Before selecting **Close & Apply** (or the equivalent action in your current interface), check: - Row counts before and after transformations. - Column names and types. - Duplicate keys where uniqueness is expected. - Null and error counts in critical fields. - Minimum, maximum and representative values for numeric columns. - Whether filters or replacements removed legitimate records. - Whether the source refresh reproduces the expected result. For recurring reports, document why each non-obvious transformation exists. Another analyst should be able to understand the step without reverse-engineering the original workbook. ## Troubleshooting patterns | Symptom | Likely cause | First check | |---|---|---| | A numeric field sorts alphabetically | Text type | Inspect the detected type and locale parsing | | A query fails after a source update | Renamed or removed column | Find the first failing Applied Step | | Totals fall after cleaning | Rows or errors were removed | Compare row counts and inspect filtered records | | A blank becomes zero in a chart | Replacement or aggregation behavior | Review the transformation rule and visual aggregation | | Refresh differs from the preview | Source changed or credentials/permissions differ | Refresh against the real source and inspect the error detail | ## Source and further reading Adapted from *Introduction to Power BI*, Monash Bioinformatics Platform / Monash Data Fluency initiative (2020), pp. 13–20. Licensed source material: **CC BY 4.0**. Current Power Query behavior is cross-checked against Microsoft's guidance on [Applied Steps](https://learn.microsoft.com/en-us/power-query/applied-steps) and [error handling](https://learn.microsoft.com/en-us/power-query/dealing-with-errors). ## Official references - Using the Applied Steps list — https://learn.microsoft.com/en-us/power-query/applied-steps (verified 2026-11-13) - Dealing with errors in Power Query — https://learn.microsoft.com/en-us/power-query/dealing-with-errors (verified 2026-11-13)