Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
hi erveryone
how i can dynamic my local drive path such as (C,D,E,) for import multi file into power query?
Best Regards!
Solved! Go to Solution.
Hi @hamid,
Based on my test, we can use the Parameters to meet your requirement. Here I create a parameter like this.
After that we need to change the M code in the advanced editor, then we can choose the path that we want to import different files in power query. Please notice files will be combined within a given folder as long as they have the same file type and structure (such as the same columns). Here is the M code in advanced editor for your reference.
let Source = Folder.Files("file path\"& Parameter1), #"Invoke Custom Function1" = Table.AddColumn(Source, "Transform File from C (3)", each #"Transform File from C (3)"([Content])), #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}), #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File from C (3)"}), #"Expanded Transform File from C (3)" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from C (3)", {"ID", "name"}, {"Transform File from C (3).ID", "Transform File from C (3).name"}) in #"Expanded Transform File from C (3)"
Regards,
Frank
Hi Frank!
Thanks for your answer.
User | Count |
---|---|
83 | |
69 | |
68 | |
65 | |
54 |
User | Count |
---|---|
93 | |
93 | |
91 | |
76 | |
69 |