Business Purpose
Power Query is the data preparation layer used to connect to business sources and shape their data before it is analyzed in Power BI. It helps turn inconsistent operational records into a repeatable dataset for reporting. A sales dashboard is only as reliable as the dates, products, customers, and amounts behind it; preparation is where those inputs are inspected and made consistent.
Consider a retailer whose sales arrive as weekly spreadsheets from several stores, while product descriptions and category assignments are maintained in a separate file. The reports need comparable sales by store, product, and week. If each spreadsheet uses a different column name or stores dates and amounts in a different format, simply loading every file can produce incomplete or misleading comparisons. Power Query provides a visible sequence of transformations that can be refreshed when new source data arrives.
The goal is not to make every source look identical for its own sake. Each transformation should support a reporting need, protect a business rule, or make the data easier to validate. Keep source records traceable where practical, and avoid silently changing values whose business meaning is uncertain.
Connecting to Sources
Start by identifying where the data lives and who owns it. Common business sources include Excel workbooks, text or CSV files, folders of recurring exports, databases, and cloud business applications. Choose the connector that matches the actual source and access method. A folder connector can be useful when each new file follows the same structure; combining unrelated files from a folder can instead introduce unexpected columns or duplicate records.
Before connecting, confirm the intended tables or files, the reporting period, and whether the source is a current operational extract or a historical archive. Check that the account used for access has the required permission. Power BI may require credentials, and privacy settings can affect how data from different sources is combined. Treat credentials and access as part of report ownership: a refresh that works only under the report author's account is not a dependable business process.
In the Power Query preview, inspect column names, sample values, and the shape of the data before applying changes. Confirm that the selected worksheet or table contains the relevant records rather than a title page, subtotal section, or notes. If records begin after several introductory rows, remove only those rows that are consistently outside the data. Record source assumptions, such as file naming and required columns, so future owners can spot when an export changes.

Shaping Data for Reporting
Use transformations to make records consistent and analysis-ready. Set each column to a suitable data type: transaction dates should be dates, quantities should be numeric, and identifiers should be treated consistently as text or numbers according to how the business uses them. Product codes with leading zeroes, for example, should not be converted to numbers if those zeroes are meaningful. Correct data types early because they affect filtering, calculations, relationships, and error detection.
Clean text fields by removing unwanted spaces and non-printing characters where appropriate, and standardize values such as store names or status labels when there is an agreed mapping. Rename vague columns to clear business terms, remove columns that have no reporting or audit purpose, and filter out rows that are not transactions, such as repeated headers or blank lines. Do not remove errors automatically without understanding their cause. A conversion error may reveal a malformed record that needs correction or a documented exclusion rule.
Reshape data to match the question the report needs to answer. If a spreadsheet stores each month in a separate column, unpivoting those month columns can create a row for each product and month, which is often easier to analyze over time. To combine January and February store exports that share the same structure, append their rows. To add product category to sales records, merge the sales query with the product lookup using the product key, then verify that the match did not unexpectedly multiply records or leave products unmatched. Appending stacks records; merging brings related columns together.
Validate the Prepared Data
Validation should test business meaning, not only whether a transformation completed. Compare the number of source rows with the prepared row count and account for any deliberate exclusions. Check for blank dates, missing transaction identifiers, negative or zero quantities, unexpected sales values, and duplicate records. Some cases may be legitimate, such as returns or adjustments, so use business rules before treating them as errors.
For a merge, check how many sales records did not find a matching product and whether the product key is unique in the lookup. A lookup with duplicate keys can duplicate sales rows after a merge, inflating revenue. For an append, confirm that the expected source files were included and that columns align despite differences in spelling or capitalization. Compare prepared sales totals with a trusted source report for the same stores and period, explaining any exclusions or timing differences.
Keep transformations understandable and ordered so another analyst can inspect them. Power Query records each operation as an applied step, making it possible to review where values were filtered, renamed, or reshaped. When a source export changes, review the preview and the affected steps rather than assuming the refresh is valid just because it completed. A successful refresh confirms that data was retrieved and steps ran; it does not prove the resulting business figures are correct.

Load, Refresh, and Ownership
When the prepared queries meet the reporting need, load the necessary tables into the Power BI model. Queries that are only intermediate preparation steps and are not needed as separate model tables can often have loading disabled, keeping the model focused. Decide this based on the reporting design and audit needs, not as a blanket rule. Power Query prepares the data; relationships, measures, and report visuals are handled in the model and report layers.
Plan refresh around the source's real operating process. If a weekly file is expected in a particular folder, ensure the folder location and file structure remain stable and that the refresh identity can access them. Confirm credentials for every relevant source, the expected refresh schedule, and who will investigate failures. If files are moved or renamed, or a column disappears, the query may need attention before the dashboard can be trusted again.
A practical handoff includes the source locations, the purpose of important transformations, known exclusions, validation totals, and the person responsible for source changes. Use this as a release check before publishing: required records are present, key fields have suitable types, joins behave as expected, totals reconcile, and refresh access is owned by the business process rather than an individual analyst. These controls make data preparation repeatable and give report users a clear basis for trusting the dashboard.
Lesson Checkpoint
Review what you learned and get feedback on your work.