Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Good morning,
I wonder if someone can help me with this, or let me know if it is even possible.
I have 3 tables in 3 files with identical layouts. I am re-using my script for my first table to reload the other 2 tables by using a blank query and parameter to define the name of the other two files:
(status)=>
let
Source = Csv.Document(File.Contents("C:\Users\Paul\Documents\Power BI\Covid\data\time_series_covid19_" & status & "_global.csv"),[Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Removed Columns" = Table.RemoveColumns(#"Promoted Headers",{"Province/State", "Lat", "Long"}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Removed Columns", {"Country/Region"}, "Attribute", "Value"),
#"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Other Columns",{{"Attribute", type date}, {"Value", Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Attribute", "Date"}, {"Value", status}})
in
#"Renamed Columns"
This works perfectly.
However, when I trigger the query to load my new files, the tables are automatically named:
Invoked Function
Invoked Function (2)
Is it possible, from within the script, to rename a query? I realize I can just rename it manually, I am just interested if it is possible to do so.
Hello, did you end up finding a way to have the Invoke Function be named from the advanced editor?
Did you solve this?
I´m trying to find a way to name the tables created from a function or rename them after creation.
Hi @paulvans182 ,
try this.
Import the folder and adapt the Transform File function accordingly.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 65 | |
| 43 | |
| 41 | |
| 33 | |
| 23 |
| User | Count |
|---|---|
| 199 | |
| 124 | |
| 104 | |
| 74 | |
| 55 |