Forum Discussion
Get Data from folder for XML
Hi,
Need help as I got issue with Get Data from Folder feature. The file I'm using are XML. I'm not really understand how XML works, but if I open it in Notepad, there is 1st tag (before Items tag) which is a Date, like this :
So I've done this step :
1. From Power BI Desktop, Get Data, and choose Folder
2. Type the path, and choose Transform Data.
3. In Power Query editor, as the folder contains many other files, I filtered the name to files start with 'xyz' which are my XML files.
On 1st try, I removed other columns except Content so it become like this :
And press that Combine Files icon on the top right.
The result is a table of the XML contain but it seems only took data start from Items Tag. 1st question is how to include the 1st tag right before Items tag ?
On 2nd try, I realized before I remove other columns, there is Date Create column, and think I can use that. So leave like this :
And after click Combine Files, the end result still not included that "Date created" column. So, probably my 2nd question is if I want to include that column, which is originally outside the Content, can I and how ? But the 1st questions shoud be fine already.
Thanks in advance.
Wong
Hi MFelix,
I'm afraid not, if using Combine & Load, then after it either Load or again choose Transform data, it will directly read my XML and give me the result without epand the 'table' inside the Item tag.
Like this:
So I think the best way still need to choose Transform at the very first. And this step also being tearched in every Power BI courses, they all saying to"not" use that, instead go to "Transform"
Thanks
8 Replies
- MFelixSuper User
Hi Anonymous ,
The get data from folder, has two different options.
- Load
- Returns the values has you have in a simple table with data
- Combine & Transform
- This option will ask you to select the file to use as model and creates a function were all the informatin is setup accordingly to your needs
- Opens the XML table
- Allow to add change columns
- This option will ask you to select the file to use as model and creates a function were all the informatin is setup accordingly to your needs
Further more on the combine and load you can see there is are several steps that allow to filter the columns before the files being combine.
- AnonymousNot applicable
Hi MFelix,
Thank you very much for your insight. 😅
- v-kelly-msftCommunity Support
Hi Anonymous ,
Is your issue solved now?If so,could you pls mark the reply as answered to close it?
Much appreciated.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
- Load