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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Converting XML data to a table

Hello all,

 

I am trying to reach out to our organisation's HR data and shape the data on PowerBI Desktop.

 

We are connecting through API and the data structure is XML.

 

When I connect to the directory, data is visible as below:

1.jpg

 

2.jpg

 

When I open the query editor, what I see is below (as the next step I am expanding the tables to see the data):

3.jpg

 

After expanding the tables; now I see:

4.jpg

 

However, the data structure I need  is like the following:

 

displayNamefirstNamelastNamejobTitle
John DoeJohnDoeExpert
Jane DoeJaneDoeLead

 

I tried to convert data using "transpose" in the query, but it didn't work..

 

You guys have any idea on how to shape the data in a usable format?

 

Thanks in advance for your support.

 

Ugur

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous,

You can pivot Attribute::ID column, select Element::Text column as your Values Column, and under Advanced Options, choose Don't Aggregate. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Anonymous,

You can pivot Attribute::ID column, select Element::Text column as your Values Column, and under Advanced Options, choose Don't Aggregate. 

Anonymous
Not applicable

@Anonymous Thank you! This is what I've been looking for!

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.