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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Can I automatically change the Excel sheet name on Power Query?

Hello all,

 

I'm receiving weekly reports in Excel format from a client, and I set up a Power Automate flow that copies the attachment to a SharePoint Library, after renaming it.  My dashboard then pulls this data, and we are all happy. However, I noticed today that because the sheet is named differently every week, Power BI fails in the navigation step. I can rename the Excel workbook on Power Automate, but I cannot rename the sheet. I am curious whether I can do that on Power Query instead. See below, screenshots that show the applied steps and what happens in the navigation step. What I want to do is to change Source to something generic like "Sheet1". Is that possible?

 

Thank you,

 

 

thatakke_1-1650093760998.png

 

 

thatakke_0-1650093733748.png

 

1 ACCEPTED SOLUTION
serpiva64
Super User
Super User

Hi,

if you have only 1 sheet in  your workbook you can try deleting the navigation step and then expand Data column

Otherwise you can also try to modify the navigation step 

= Source{[Item="Sheet1",Kind="Sheet"]}[Data]

to a generic one:

= Source{0}[Data]

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

View solution in original post

3 REPLIES 3
serpiva64
Super User
Super User

Hi,

if you have only 1 sheet in  your workbook you can try deleting the navigation step and then expand Data column

Otherwise you can also try to modify the navigation step 

= Source{[Item="Sheet1",Kind="Sheet"]}[Data]

to a generic one:

= Source{0}[Data]

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

This was just what I was looking for regarding an issue I had with dynamic worksheet names!

Anonymous
Not applicable

Thanks, @serpiva64 

Your suggestion to change it to a generic one is ingenious and, of course, it worked! 

 

Thank you,

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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