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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
cristianml
Post Prodigy
Post Prodigy

Change parameter user - Macro to pick up and refresh table

Hi,

 

I have a problem when I need to share Power Query workbook on my local PC to another user.  All of the hard coded paths that refer to my local files all have to be rewritten to send the workbook to other user.

How can I solved this, is there any default parameter that can be used so i can avoid rewrite hard coded paths?

 

Also what I'm looking here is in some how set up a VBA Macro that can pick up the folder to refresh the table already created. Is this possible in Power query ?

 

Thanks and regads.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You do not really change paths within PowerQuery. Instead, you take advantage of the fact that you can read the current workbook filename and path using the  CELL("filename",B6) function and the standard Data From Table Range. More details can be found in the blog below:

 

https://www.excelguru.ca/blog/2014/11/26/building-a-parameter-table-for-power-query/ 

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

You do not really change paths within PowerQuery. Instead, you take advantage of the fact that you can read the current workbook filename and path using the  CELL("filename",B6) function and the standard Data From Table Range. More details can be found in the blog below:

 

https://www.excelguru.ca/blog/2014/11/26/building-a-parameter-table-for-power-query/ 

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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