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
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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors