Forum Discussion

likesharad's avatar
likesharad
New Member
5 years ago
Solved

How to get xml tag attribute value as a column

Can someone help with below issue:

I'm importing XML file in power BI for reporting. I've tranformed the xml tags in required columns but in one of the XML tag contains multiple attributes as:

<plan key="RBPOC-DNB" enabled="true" type="chain" shortKey="DNB" shortName="Execution Plan - DNB - Arch " name="Test Automation - Trunk - Execution Plan - DNB - Arch ">

 

How can I get two of these attributes values of this xml tag in additional columns for my report?

  • Hi likesharad ,

    Looks like you have missed the ending "</plan>" in the xml file, add it and use xml connector in power bi to get each value of attribute:

    <plan key="RBPOC-DNB" enabled="true" type="chain" shortKey="DNB" shortName="Execution Plan - DNB - Arch " name="Test Automation - Trunk - Execution Plan - DNB - Arch "></plan>

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

1 Reply

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

    Hi likesharad ,

    Looks like you have missed the ending "</plan>" in the xml file, add it and use xml connector in power bi to get each value of attribute:

    <plan key="RBPOC-DNB" enabled="true" type="chain" shortKey="DNB" shortName="Execution Plan - DNB - Arch " name="Test Automation - Trunk - Execution Plan - DNB - Arch "></plan>

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.