cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Licantrop0
Microsoft
Microsoft

ExpandTableColumn doesn't expand everything if XML tag has 1 or many items

I'm trying to expand a column (tag Property) derived from an xml table that can have 1 or more children (tags value):

 

 

 

 

<objects>
  <object name="a">
     <property>
      <value>1</value>
    </property>
  </object>
  <object name="b">
     <property>
      <value>1</value>
      <value>2</value>
      <value>3</value>
     </property>
  </object>
  <object name="c">
     <property>
       <value>3</value>
     </property>
  </object>
  <object name="d">
    <property>
     <value>1</value>
     <value>2</value>
     <value>4</value>
     <value>5</value>
    </property>
  </object>
  <object name="e">
   <property>
     <value>5</value>
   </property>
  </object>
</objects>

 

 

 

 

Licantrop0_0-1600639091424.png

 

When I click expand on the column header, Power Bi doesn't understand that the column may have more than one children, and only expand the ones with 1 child, leaving the others as "Table":

Licantrop0_1-1600639130002.png

from here, I cannot further expand...

 

Is this a bug? how can I workaround this?

 

thanks,

Luca

4 REPLIES 4
Fowmy
Super User
Super User

@Licantrop0 

These two links should provide help on the issue of expanding nested tables, please check it out.

https://blog.crossjoin.co.uk/2014/05/21/expanding-all-columns-in-a-table-in-power-query/
https://community.powerbi.com/t5/Desktop/How-to-expand-all-nested-tables-at-once-table-expandtableco...

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi @Fowmy, thanks for pointing me into the right direction.

The recursive function is the right approach (even thou in my case there are just 2 levels), but I don't understand how to apply it into my sample data, can you help me?

@Licantrop0 

Can you share a sample file the same structure to test?

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors