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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Stephan80
New Member

Power query columns containing text data and tables

Good day

I am new to you forum and would greatly appreciate your help. I have a xml. dataset but one of my columns contains tables as well as other text data. If I try to expand the tables, I get an error.

Stephan80_0-1643186611295.png

How do I extract the data from the tables while keeping the text data already in the column?
Thank you in advance



1 ACCEPTED SOLUTION
KNP
Super User
Super User

Add a new step.

Paste this and alter this to suit your needs.

= Table.TransformColumns(YourPreviousStep, {{"DischargePortATA", each if Value.Is(_, type table) then _ else #table({"DischargePortATA"}, {{_}}) }})

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

View solution in original post

3 REPLIES 3
KNP
Super User
Super User

Add a new step.

Paste this and alter this to suit your needs.

= Table.TransformColumns(YourPreviousStep, {{"DischargePortATA", each if Value.Is(_, type table) then _ else #table({"DischargePortATA"}, {{_}}) }})

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

I managed to get this to work, but the results yeild an exponentially large volume of rows, too much to handle, when the results get refreshed back into excel or PowerBi, after I expand the resulting table columns after this step.  Could I be missing something?

CNENFRNL
Community Champion
Community Champion

First, take a look at your xml file, why different data types appear at the same depth of node tree (timestamp and subtree in your example).

 

Secondly, use Table.ReplaceValue() to substitute Table value with some certain values.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors