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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Support refresh from the web when running code/script (Power Query, SQL, R...) from a text file

When you deploy multiple dashboards that use the same script/code (whether it data transformation in Power Query (M), a SQL statement or an R code), it is efficient to put one code in a text file, and query against the file, rather then copy/pasting the code every time you make a change. Here is an example of a workaround: https://blog.crossjoin.co.uk/2014/02/04/loading-power-query-m-code-from-text-files/ The problem is that now you can't schedule a refresh from the web: Power BI throws an error "You can't schedule refresh for this dataset because one or more sources currently don't support refresh." Can you make such approach acceptable and support scheduled refresh?
Status: Needs Votes
Comments
tkaduk
New Member
I actually store my codes in OneDrive for Business, but I point Power BI to the web link, not the folder on the hard drive. But that doesn't matter: the main idea is to let Power BI consume the code from the text file, whether hosted on disk, on the cloud or anywhere else.
AMWIECZO
New Member
My team is sharing queries on git (for sharing and peer reviews) and we would also really like to load them from disk. Currently on each change we need to manually go to Advanced Editor and paste the updated query
cristian_avend1
New Member
This is something we need.. It's a paint to copy the code and mantain the same version of the code.
sebastiendeboss
New Member
Why not vote for a native solutions from power BI? https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/40272415-reuse-custom-power-query-functions
fbcideas_migusr
New Member
This could be really usefull to allow for some collaboration between developers and end-users. Currently, an end-user can't work on the same PBIX file as a developer does event though they are not making conflictual changes. The developer could be implementing complex transformations while the end-user just wants to format some fields, adjust relationships, add new sources. Otherwise, the end-users might end up doing stuff themselves in Power Query without any IT involvement which, if not mentored properly, can lead to erroneous measures and data. Or worse, IT will completely give up power Query to end-users and manage all measures in other data warehouse, cubes or data lakes.
fbcideas_migusr
New Member
Status changed to: Needs Votes