Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
I'm trying to import data from all xml files in a folder. You know how to edit this code in the Query for take all xml files?
= #"Modificato tipo"{[#"Folder Path"="C:\Users\johnbyer\Desktop\Fatturazione attiva\",Name="10.xml"]}[Content]
I need to replace Name="10.xml" with a code or a function that make possible to take all xml files and not only 1. I'm a newbie please easy steps. I tried this https://community.powerbi.com/t5/Desktop/Import-multiple-XML-files/m-p/8900#M1596 but i dont know how to add a column and seems not working
I tried with "C:\Users\johnbyer\Desktop\Fatturazione attiva\*.xml" but not working
Solved! Go to Solution.
Hi @Poisedon,
Since you are using the Folder connector, you just need to follow the guidance of the connector GUI. Please refer to the snapshot below. Why did you need to replace the code?
Best Regards,
You want to start with a Folder query. Once you enter your path, on the next screen choose Combine and Edit.
Should end up with something like this:
let Source = Folder.Files("c:\temp\powerbi\xml"), #"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true), #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File from xml", each #"Transform File from xml"([Content])), #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}), #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File from xml"}), #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from xml", Table.ColumnNames(#"Transform File from xml"(#"Sample File"))), #"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Source.Name", type text}, {"thing", type text}, {"value", Int64.Type}}) in #"Changed Type"
Can you explain easier? I tried copying this code and editing path but still not working
Hi @Poisedon,
Since you are using the Folder connector, you just need to follow the guidance of the connector GUI. Please refer to the snapshot below. Why did you need to replace the code?
Best Regards,
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
60 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |