Power Query in Power BI: Where to Find and How to Open It
In this article
Power Query is located within the Transform Data menu in Power BI Desktop. To access it, click the Home tab on the top ribbon and select Transform Data, which opens the Power Query Editor in a separate window. This tool allows you to clean, shape, and transform your raw data before it is loaded into the Power BI data model for reporting.
What You'll Need
- A computer with Windows installed (Power BI Desktop is not available for macOS).
- Power BI Desktop installed and launched.
- A data source (such as an Excel file, CSV, or SQL database) already connected to your report, or a plan to connect to one.
Step-by-Step
- Launch Power BI Desktop: Open the application on your computer. If you are starting a brand new project, you will see a splash screen; you can close this to enter the main workspace.
- Locate the Home Ribbon: Look at the top of the screen. Ensure you are on the Home tab. Note that labels and icons may differ slightly depending on your version of Power BI Desktop or your regional settings.
- Click Transform Data: In the center of the Home ribbon, find the Transform Data button (represented by a table icon with a small pencil). Clicking this button will launch the Power Query Editor in a completely new window, separate from the main Power BI report view.
- Alternative Access via Data Source Settings: If you have already loaded data and want to return to the editor, you can also right-click on any table name in the Data pane (located on the far right of the screen) and select Edit query. This will also trigger the Power Query Editor to open.
- Alternative Access during Data Import: When you first click Get Data and select your source, a preview window appears. Instead of clicking "Load," click the Transform Data button at the bottom of that preview window. This is the recommended workflow, as it allows you to clean the data before it ever enters your model.
- Navigating the Editor: Once the Power Query Editor window is open, you will see your queries listed on the left pane, the data preview in the center, and the Applied Steps pane on the right. Any change you make here is recorded as a step that Power BI will repeat every time the data is refreshed.
- Saving and Applying Changes: After you have finished transforming your data, click the Close & Apply button in the top-left corner of the Power Query window. This saves your transformations and loads the cleaned data back into the main Power BI Desktop interface.
Common Mistakes
One of the most frequent mistakes users make is clicking Load instead of Transform Data during the initial import process. While loading the data immediately seems faster, it often results in errors if the raw data contains null values, incorrect data types, or unnecessary columns. Fixing these issues after the data is loaded requires you to go back into Power Query anyway, meaning you have to perform the work twice.
Another common error is forgetting to check the Applied Steps pane. Because Power Query does not have a traditional "Undo" button (Ctrl+Z does not work for data transformations), users often make a mistake and try to undo it using keyboard shortcuts. In Power Query, you must manually delete the specific step by clicking the X icon next to the step name in the Applied Steps list. If you delete a step in the middle of the list, any subsequent steps that relied on that transformation may break, causing an error in the data preview.
Users also frequently confuse the Data View (the table icon on the left sidebar of the main Power BI window) with the Power Query Editor. The Data View allows you to see the loaded data and create calculated columns using DAX, but it does not allow you to perform structural transformations like splitting columns, pivoting data, or filtering out rows at the source. If you find you cannot change the data type or remove a column, you are likely in the Data View and need to return to the Power Query Editor via the Transform Data button.
Tips
To keep your Power Query environment organized, always rename your queries immediately after importing them. By default, Power BI names queries based on the file name or sheet name (e.g., "Sheet1" or "Sales_Data_2023_Final"). Right-click the query in the left-hand pane and select Rename to give it a clear, business-friendly name like "Annual Sales". This makes it much easier to manage your relationships in the Model view later.
Utilize the Column Quality and Column Distribution tools to spot errors quickly. In the Power Query Editor, go to the View tab and check the boxes for "Column quality," "Column distribution," and "Column profile." This adds a small bar under each column header that shows the percentage of data that is valid, empty, or contains errors. This is the fastest way to identify if a column has unexpected null values before you start building your visuals.
Whenever possible, perform your filtering and column removal in Power Query rather than using filters on the report page. This process, known as "folding," allows Power BI to push the work back to the original data source (like a SQL server), which significantly improves performance and reduces the amount of memory used by your computer.
Troubleshooting
If the Transform Data button is greyed out or unresponsive, first check if you have an active data connection. If no data has been imported yet, some versions of the interface may behave differently, though typically the button remains active to allow you to start a new query. Try restarting Power BI Desktop to clear any temporary glitches in the ribbon interface.
If you click Transform Data and the Power Query window opens but is completely blank or freezes, check your system resources. Power Query loads a preview of your data into memory; if you are connecting to a massive dataset without initial filters, your RAM may be overwhelmed. To fix this, try connecting to a smaller sample file first to verify the connection works, or ensure your computer has at least 8GB of RAM available.
If you encounter an error message stating "The column [Column Name] of the table wasn't found" after opening Power Query, it usually means the source file has changed. For example, if you renamed a column in your Excel spreadsheet, Power Query will fail because it is looking for the old name. To fix this, go to the Applied Steps pane, find the step where the error first appears (usually the "Navigation" or "Promoted Headers" step), and click the gear icon next to it to update the source or manually edit the formula bar to reflect the new column name.
If the Power Query Editor window opens behind the main Power BI window, it may seem like nothing happened. Minimize the main Power BI window or use Alt+Tab to see if the "Power Query Editor" window is running in the background.
Frequently Asked Questions
Is Power Query the same as DAX?
No. Power Query uses the M language to transform and clean data before it enters the model. DAX (Data Analysis Expressions) is used after the data is loaded to create calculated measures and columns for analysis.
Can I use Power Query in Excel?
Yes, Power Query is available in Excel. It is found under the Data tab in the Get & Transform Data group. The interface is nearly identical to the one found in Power BI.
Do my changes in Power Query happen in real-time in my report?
No. Changes made in Power Query only take effect in your report after you click Close & Apply. This ensures that your report doesn't flicker or crash while you are in the middle of cleaning your data.
Can I delete a step in Power Query if I make a mistake?
Yes. In the Applied Steps pane on the right side of the editor, click the X icon next to the step you wish to remove. Be careful, as deleting an early step may break later steps.
Why is my data not updating in Power Query?
Power Query shows a preview of your data. To see the most recent changes from your source file, you must click the Refresh Preview button in the Home tab of the Power Query Editor.