Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
DavidKress
Frequent Visitor

Renaming Excel files imported to PowerBI

 

I created a .pbix where I imported data from tabs of different Excel files I have on my local machine.  At the start, I regarded the .pbix I created as a testing enviornment, which I would never publish to users.   As a result, I never considered the naming convention of the Excel files or the tabs of the Excel files I imported into my data model.  For example, I have a table in my data model with the name "20160210TrainData"....the result of the name of the tab I imported from the Excel file on my maching with the equally unfriendly file name "2016_Feb_TrainingTracker.xls"

 

I now want to keep the .pbix I created, put into production and publish out to my user community.  Given this .pbix will now have longevity, I want to know if I can go to the Excel files on my local machine, clean up the file names to be more user friendly and whether that will flow thru to my PBIX or will it mess up my entire data model.  To be specific:

 

1. I want to go back to my local machine and change the Excel file name from "2016_Feb_TrainingTracker.xls" to simply be "TrainingTracker.xls"

 

2. Within that Excel file, I want to rename the tab I imported to my .pbix from "20160210TrainData" to simply "TrainingData"

 

Net/net, will renaming the Excel file and/or the tab of the Excel file on my local machine (which I previously imported to my .pbix) screw up the .pbix connection and my data model or will my .pbix pick up both the file name and tab name changes I make? 

 

Hope that makes sense. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Yes, you can change the excel name and sheet name. After you change it, you need to go to Power BI->Power Query Editor->Advanced Editor, than modify the excel name and sheet name in M code accordingly.

2018-04-12_13-16-13.png

 

 

 

 

Or, you can just modify the table name in Power BI directly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Yes, you can change the excel name and sheet name. After you change it, you need to go to Power BI->Power Query Editor->Advanced Editor, than modify the excel name and sheet name in M code accordingly.

2018-04-12_13-16-13.png

 

 

 

 

Or, you can just modify the table name in Power BI directly.

anandav
Skilled Sharer
Skilled Sharer

@DavidKress,

Not sure whether I am missing the complexity, but you should be able to just rename the table in Power BI. It doesn't matter what your Excel file and Excel tabs names are, the user will see your renamed table in Power BI and the when they use the columns it will be using the new renamed name.

 

PowerBI Sample 1.jpg

 

Same applies to teh column names of the table as well.

Hope this helps.

 

Helpful resources

Announcements
March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.