Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Convert XML data into a table

Hi everyone,

 

My dashboard is connected with a Web Service API via POST method and the output is XML. However, the I'm getting is scattered over multiple rows instead of being on the same row for a particular user.

 

My current Query is as below:

let
    //Insert API key here
    apiKey = "######",
    //Web Services url
    url = "######",
    //Company Name
    CompanyText = "ABCompany",
    //Add the text "company=" to the beginning
    CompanyName = "company=" & CompanyText,
    //Call the web service
    Source = Table.FromColumns({
        Lines.FromBinary(
            Web.Contents(
                    url & apiKey,
                    [Content=Text.ToBinary(CompanyName)])
        )
    })
in
    Source
 
I would like the output to be a table like this:
 
 
Would really appreciate your help!

2 Replies

  • v-xicai's avatar
    v-xicai
    Community Support

    Hi Anonymous  ,

     

    Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

     

    Best regards

    Amy