You are currently viewing 3 Easy Ways to Rename Columns in Power Query

3 Easy Ways to Rename Columns in Power Query

Renaming columns in Power Query is one of the most common data transformations when working with data in Power BI or Excel. In this blog post, we dive into three easy ways to perform this task – follow along!

NOTE

Screenshots presented here are from Power Query inside of Power BI. The steps are the same if you are accessing it through Excel.

Introduction

Navigating through Power Query (in Power BI or Excel) can be daunting, especially when you’re faced with data directly from sources like SQL Server databases, which often feature non-business-friendly column names. For example, your import of the raw data might display ‘employees_full_name’ for the full name from an employees table. In reporting this data, you would want to display it simply as ‘Employee Name’.

Why Rename Columns?

As illustrated above, data from sources like SQL Server database often come with column names that use abbreviations, underscores, or no spaces, reflecting database conventions rather than readability. Renaming these columns is not just about aesthetics; it’s about making data accessible and understandable at a glance. User-friendly names ensure that your reports look polished and are ready for professional presentation.

Steps to Rename Columns

Microsoft offers three main ways of renaming columns in Power Query. These are direct editing, using the context menu, and through the Transform tab:

In the scenario described above, you load each separate table with new hires for specific fiscal years to Power Query and you need to combine them to create a single dataset.

Direct Editing

The most straightforward method is direct editing, which only requires a double-click in the column header:

This method is simple and intuitive, perfect for on-the-fly adjustments.

Using the Context Menu

If you prefer to right-click instead of double-click, Power Query offers this option for you:

Aside: you may have noticed an icon beside your column name – this indicates the data type of each column. If you want to learn more about data types and how to change them, you can read our blog post Understanding Data Types in Power Query (Power BI & Excel).

Using the Transform Tab

Lastly, you can rename columns right from the Transform tab on the ribbon:

And, that’s it! You’re done. It’s as simple as that.

Now, when renaming columns in Power Query, you should keep in mind some basic best practices. Primarily, you should aim for clarity and consistency. Use spaces, avoid technical jargon, and capitalize each word to ensure that your data speaks clearly to its audience.

Conclusion

Renaming columns in Power Query is a simple yet powerful way to enhance the readability and professionalism of your data reports. By following the steps outlined above, you can transform cryptic database names into clear, user-friendly column headings.

Need Help Getting Started With Power BI?

Our Microsoft Certified consultants can help with the implementation of Power BI in your organization

Leave a Reply