Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lfrigione
Helper II
Helper II

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?

1 ACCEPTED SOLUTION

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

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

View solution in original post

3 REPLIES 3

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


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

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

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.