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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
locus
New Member

Getting XML Data into Powerbi with mappng

I have an XML file exported ouf of an application that has multiple levels of tags. When importing to Excel we have to select a child tag due to a roll up tag above that tricks Excel into thinking its the main table. Once we do that Excel sees it as a valid data source and shows the tables. 

Powerbi cannot map to the child tag even if i delete the parent. Is there any way to map fields in Powerbi on import? 

 

Sample of XML file (Top lines only)

 

<?xml version="1.0" encoding="UTF-8" ?>

<exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" units="m" filename="" filepath="">
<batchtest name="Report" internal_name="Report" units="m">
<clashtests>
<clashtest name="L1 DRAIN/MP" test_type="hard" status="old" tolerance="0.000" merge_composites="1">
<linkage mode="none"/>
<rules>
<rule name="Items in same file" enabled="1" creator="lcop_clash_adapator_for_lcodpclash_ignore_same_file">
<ruleparams/>
</rule>
</rules>
<clashresults> Need to Start Table here
<clashresult name="Clash77" guid="3fc49871-0e41-43b7-a15b-d8dce853c980" status="approved" distance="-0.010">
<description>Hard</description>
<resultstatus>Approved</resultstatus>
<clashpoint>
<pos3f x="49.002" y="123.329" z="6.159"/>
</clashpoint>

Now i can remove the tags above the red text and it works fine in PowerBI. But everytime we export it we will have to edit hte XML to remove the top level tags. In Excel we dont have to do this once we use the XML mapping tool to update. 

I can also leave the Excel file in place and go XML-Excel-PowerBI but i would rather not. 

2 REPLIES 2
ChrisMendoza
Resident Rockstar
Resident Rockstar

@locus - 

I honestly don't know much about working with XML except for that there is a Get Data to XML type.

 

Specifically Get Data > File > XML

 

I tried with your sample except I received an error saying 'closing' tags did not exist. Possibly try that if you haven't already?

 






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Not a complete XML file so yes it will give you that. File is quite long and  i can attach it but didnt want to paste the whole thing into a post. 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.