Yes, you can change the name of a table in Power BI Desktop, Power BI Service, or Excel to make your reports clearer and easier to navigate. This requires opening the Data view, selecting the table, and using the properties pane. You can also rename tables in Power Query to change the underlying source name.

What You'll Need

  • Power BI Desktop: The desktop application for creating reports locally.
  • Power BI Service: The cloud-based service for publishing and sharing reports.
  • Microsoft Excel with Power BI Add-in: Used to connect to Power BI datasets and create reports.
  • Basic Data Understanding: Familiarity with how data is structured in your source.

Step-by-Step

Changing a table name in Power BI is a straightforward process, but the exact steps depend on which application you are using and whether you are editing the name in the report view or the data model. The goal is always to change how the table is identified in the interface and the data model.

Renaming a Table in Power BI Desktop

Power BI Desktop is the primary environment for data modeling. Here is how to rename a table so it appears correctly in the Fields pane and the data model view.

  1. Open the Data View: In Power BI Desktop, look for the View icon on the left-hand navigation pane (usually the third icon from the top). Click on it to switch from Report View to Data View. In Data View, you will see a list of tables on the left side, representing the current data model.

  2. Identify the Table: Locate the specific table you wish to rename in the left navigation pane. Note that the name listed here is the current table name in the data model. Click on the table name once to select it. The table will then be highlighted in the main canvas area.

  3. Access the Table Settings: Look at the ribbon menu at the top of the Power BI Desktop window. On the Home tab, you will find the Table Tools section. Click on Table Info. Alternatively, you can right-click directly on the table name in the left pane and select Table Info from the context menu.

  4. Edit the Table Name: The Table Info dialog box will open. You will see a field labeled Table name. Click inside this field to place your cursor. Delete the existing name and type the new, desired name. This new name will immediately update in the Data View list and will be reflected in the Fields pane of your reports.

  5. Confirm and Save: Press Enter on your keyboard to save the change. The dialog box will close. It is good practice to save your report file (Ctrl+S) to ensure the new name is persisted in the .pbix file.

Renaming a Table in Power BI Service

Renaming tables in the Power BI Service is slightly different because you cannot directly edit the data model from the main report view in the cloud. The steps generally involve opening the report in Desktop, making the change, and then publishing the updated file.

  1. Download the Report: Log in to the Power BI Service and open the report you want to edit. Click the Download the report link in the top-right corner. This action downloads the current .pbix file to your local computer.

  2. Make Changes in Desktop: Open the downloaded .pbix file in Power BI Desktop. Follow the steps outlined in the section above to rename the table using the Data View and Table Info.

  3. Upload the Updated Report: Return to the Power BI Service tab in your web browser. Click the Save & publish button. This will upload your updated .pbix file, overwriting the previous version. The new table name will be visible in the Fields pane of the web report immediately after the upload completes.

Renaming a Table in Excel with Power BI

If you are using an Excel workbook connected to a Power BI dataset, you can rename tables in the Excel data model, which will update the Power BI dataset if you refresh it.

  1. Open the Data Model: Open your Excel workbook. Go to the Data tab on the ribbon and click on Manage Data Model. This will open the Power Pivot window.

  2. Select the Table: In the Power Pivot window, click on the Tables tab (or the diagram view) to see the list of tables. Locate the table you want to rename and click on it to select it.

  3. Open Table Properties: On the Power Pivot ribbon, click on Table Properties (or you can right-click on the table and select Table Properties). A dialog box will appear.

  4. Update the Name: In the Table Properties dialog, look for the Name field. Change the name to your preferred label. Click OK to save the change.

  5. Refresh the Connection: Go back to your Excel data and click Refresh All on the Data tab. This will sync the renamed table from the Excel data model back to the Power BI dataset.

Renaming Tables in Power Query

Renaming a table in the Power Query Editor changes the source name of the data. This is distinct from renaming the table in the data model, as this change affects the underlying data transformation steps.

  1. Open Power Query: In Power BI Desktop, click the Transform Data button on the Home tab. This opens the Power Query Editor.

  2. Select the Source Table: In the Queries and Dependencies pane on the left, find the query that loads the table you want to rename. Click on the query name to select it. Note that the query name and the table name are often the same in Power Query.

  3. Use the Properties Pane: Look at the right-hand side of the window for the Properties pane. If it is not visible, go to the View tab and check the box for Properties. In the properties pane, you will see a field labeled Name.

  4. Change the Name: Click inside the Name field and type the new name. This name will appear as the source name for this query. Click OK.

  5. Close and Apply: Go to the Home tab and click Close & Apply. Power BI will refresh the data using the new source name.

Common Mistakes

When renaming tables, users often encounter issues because of how Power BI handles name changes. Understanding these common pitfalls helps ensure a smooth process.

  • Renaming in Report View: A frequent mistake is trying to rename a table while in Report View. There is no direct option to rename a table in the report canvas. You must be in Data View or Power Query to make this change.

  • Forgetting to Save: When working in Power BI Desktop, it is easy to forget to save the file after renaming a table. If you close the application without saving, the changes will be lost. Always use Ctrl+S to save your work.

  • Breaking Relationships: Changing a table name can sometimes break relationships if the name change is not consistent across all objects. For example, if you have a calculated column that explicitly references the old table name, that reference will break. Power BI will flag this as an error in the Data view.

  • Inconsistent Naming Conventions: Another mistake is not adhering to a consistent naming convention. For instance, using a mix of camelCase and PascalCase for table names can make the model difficult to read. Stick to a single convention, such as PascalCase (e.g., CustomerSales), to keep the model clean.

  • Changing Query Names vs. Table Names: In Power Query, confusing the Query name with the Table name is common. Changing the Query name in the Properties pane updates the source name, but it does not update the name used in the Data model view until you refresh. Ensure you are editing the correct field for your specific goal.

Tips

Effective table naming is a key part of data modeling. Good names improve readability and reduce errors.

  • Keep it Descriptive: Use names that clearly describe the data contained within the table. Instead of naming a table "Table1" or "Data," use "CustomerDetails" or "MonthlySales." This makes it easier to identify which tables are needed for a specific metric.

  • Use Plural Nouns: It is generally best practice to use plural nouns for table names. This indicates that the table contains multiple records or rows. For example, use "Orders" rather than "Order." This convention aligns with common database naming standards.

  • Avoid Spaces: While Power BI allows spaces in table names, it is often better to avoid them. Using spaces can lead to issues when writing DAX formulas, as you must enclose the table name in square brackets. Using camelCase or underscores (e.g., CustomerOrders) avoids these issues and is considered more professional.

  • Check DAX Dependencies: Before renaming a table, search your DAX measures and calculated columns for references to the old table name. If you find any, update them before renaming to prevent errors. This is especially important in large reports.

  • Use the Data Model View: The Data Model view is a powerful tool for visualizing relationships between tables. Renaming tables in this view helps you understand the data flow and ensures that relationships are correctly configured.

Troubleshooting

If you encounter problems when renaming tables, follow these steps to diagnose and resolve the issue.

The Table Name Change Is Not Appearing

If you have followed the steps to rename a table but the name has not changed in the Fields pane or the Data view, check the following.

  • Check the View: Ensure you are looking in the correct view. If you are in Report View, you will not see the table name change. Switch to Data View to see the updated name.

  • Refresh the Report: If you are working in the Power BI Service, the change may not be visible until you refresh the report. Click the Refresh button in the ribbon to force an update.

  • Reopen the File: Sometimes, the application may not reflect changes immediately. Close Power BI Desktop and reopen the .pbix file to see if the change persists.

Relationships Are Broken After Renaming

If your data model was working fine before the rename but shows errors afterward, the issue is likely related to how Power BI tracks table references.

  • Check for Hard References: Examine your DAX measures and calculated columns. Look for any that explicitly reference the old table name in square brackets, such as `SUM('OldTableName'[Sales])`. You must update these formulas to use the new table name.

  • Verify Relationship Keys: Occasionally, changing a name can cause confusion in the data model view. Go to the Data Model view and verify that the relationships between tables are still active and correctly configured. Click on a relationship line to ensure it is not broken.

  • Clear Cache: If you are experiencing persistent issues, try clearing the Power BI Desktop cache. Go to File > Options and Settings > Options > Current File > Performance. Under Cache, click on Clear Cache. This step is safe and will not delete your data.

Error: "Table Not Found" in Power Query

If you renamed a table in Power Query but see an error when trying to load the data, the issue is that the reference to the old name exists in a transformation step.

  • Open Advanced Editor: Click on the Advanced Editor button in the Home tab of the Power Query Editor. This will show you the M code for your query.

  • Find and Replace: Search the code for the old table name. Replace all instances of the old name with the new name. Be careful to only replace the table name and not other text that may be similar.

  • Close and Apply: Once you have made the changes, close the Advanced Editor and click Close & Apply to run the updated query.

Frequently Asked Questions

Can I rename a table in a published report without editing the source file?

No, you cannot rename a table directly in a published report on the Power BI Service. The data model is locked from editing in the web interface. You must download the report to Power BI Desktop, make the change, and then publish the updated file back to the service.

Does renaming a table affect the underlying data?

No, renaming a table in the data model does not change the data source itself. It only changes the label used in Power BI to refer to that data. If you rename a table in Power Query, however, that does change the source name for that query.

What happens to my DAX measures if I rename a table?

If your DAX measures only reference the table name indirectly (for example, by selecting fields from it), they will continue to work. However, if a measure explicitly references the table name in square brackets, you must update that reference to the new name, or the measure will return an error.

Can I rename a table in a live connection from Excel?

Yes, you can rename a table in the Excel data model connected to Power BI. The steps involve opening the Power Pivot window, selecting the table, and changing its properties. However, this change is local to Excel and is not automatically pushed back to the Power BI dataset unless you refresh the connection.

Why does my table name have square brackets?

Power BI automatically adds square brackets around table names that contain spaces, special characters, or start with a number. This is a syntax requirement for DAX formulas. While you can technically rename a table to include spaces, it is generally recommended to avoid spaces and use camelCase or underscores for cleaner code.