Forum Discussion

lfrigione's avatar
lfrigione
Helper II
8 years ago
Solved

XML fields in DAX

I have an XML field in my table that is something like that:

<texts>

<text lcid="1040">Ciao<text>

<text lcid="2057">Hello<text>

</texts>

 

I Know the lcid that I want,

How can I keep only a specific text in dax query and not all xml text?

  • Hi lfrigione,

     

    The field is already a xml type. Then you can parse that field. Finally, you can extract the values you want. Please refer to the snapshot below.

    XML_fields_in_DAX

     

    Best Regards,

    Dale

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    lfrigione You can transform your value to xml in the power query editor and parse it out.

    • lfrigione's avatar
      lfrigione
      Helper II

      I can not find how to format the field as xml type

      • v-jiascu-msft's avatar
        v-jiascu-msft
        Microsoft Employee

        Hi lfrigione,

         

        The field is already a xml type. Then you can parse that field. Finally, you can extract the values you want. Please refer to the snapshot below.

        XML_fields_in_DAX

         

        Best Regards,

        Dale