Forum Discussion

wahib_mouhoubi's avatar
5 years ago
Solved

Problem reading an xml file

Hi,     i have an XML file as datasource structured as following :   <alerts>                 <alert id="1">                                <market>AA</market>                                ...
  • PhilipTreacy's avatar
    5 years ago

    Hi wahib_mouhoubi 

     

    Download sample PBIX file

     

    You are trying to get the first value from a table embedded in a column?

    So if your embedded table looks like this

    you want to extract the value A-1?

    To do this, add a Custom Column in your query with this code

    try Record.Field([participant.account]{0}, "Element:Text") otherwise [participant.account]

     

    Which gives you this result

     

    Note that this query uses the column/field names you used in your example.  If they are different in your real data, they will need to be changed.

     

    Regards

    Phil