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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
350z
Helper I
Helper I

Converting Data called from API to a Clean Table

Calling from API (Web Contents) brings source data in as plain text. The top row should be all headers (separated by comma), but all data below (encapsulated by quotation marks) should be corresponding to those column headers within rows. When I convert to table, the data doesn't play so nicely. Does anybody know how to convert this data into a clean table?

 

350z_0-1713893078113.png

Expected Result (csv example, trying to get away from this method with API call):

350z_1-1713893242973.png

 

8 REPLIES 8
lbendlin
Super User
Super User

Instead of Json.Document use Csv.Document

Data will transform to table, all data is within one column though. Some data belonging in rows merged with columns. When splitting column by delimiter, every bit of data turns into a column. Yikes! 

350z_0-1713964425687.png

350z_1-1713964473627.png

 

PLease read the documentation.  You need to specify the delimiter for Csv.Document.

Unless I'm misunderstanding, this is partially what I'm inquiring about. I already specified the delimiter as a comma. Swapping out Json.Document with Csv.Document after API call creates numerous possibilites of delimiters within data. For example, within column 1.8, "Parts Installed" should be it's own column, "Parts installed" should be it, the "/r/n/" didn't exist or show before recommendation and "05" should be within an entirely different column. The whole point of the post was to develop a clean table...kind of more of a mess although in a table. What should I be specifying as delimiter?

Not sure if that is possible but could you post a sample raw response?

Refer to first image.

sorry, can't work with screenshots.

No need to be sorry. In the future, if presumed a tall task or truly can't help, please refrain from replying unless you have a general question that applies. I'd like to keep post clear for results and communication. Thanks.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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