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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vwiles84
Helper III
Helper III

API Data transform

I have connected to an API in Power BI desktop. When transforming the data, I can covert into a table, and when I do I get a short list with a column of Name and Value.

 

Capture1.PNG

I expand the values to rows and get the following:

Capture2.PNG

 

My question is, how do I transform these rows and column to get the actual values in the dataset? 

 

6 REPLIES 6
v-eachen-msft
Community Support
Community Support

Hi @vwiles84 ,

 

Here is a resolved case which is similar to yours for your reference.

https://community.powerbi.com/t5/Desktop/Extracting-Data-from-API-and-transform-into-tables/m-p/5696...

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

I tried that one and got an error: 

Capture1.PNG

So i'm not sure if I entered in the incorrect syntax for the expandall command as the example stated ExpandAllQuandI, which is not what I am trying to use so I changed it to just ExpandAll.  Then this is the error I get.

parry2k
Super User
Super User

@vwiles84 seems like API is returning different type of data for each name, I believe you need to break it down into differen tables (based on name) and then expand it from there.

 

Like one table will be donation, one for product classes, one for employees as each of these names are sending different kind of data.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Can i do that in power query or do I have to break down the API call into levels.

@vwiles84 I will do it in power query. Right-click on your result set what you showed, and then select "Reference" it will create another query with the resultset, filter on the employee , and do the similar for other names, reference and then filter on next name and then you can expand individual queries.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

When I right click, I don't have reference. I only have COpy, Drill down and add as new query. When I add as a new query, I get the following: 

 

Capture2.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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