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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors