The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I'm pulling in data via XML and experiencing an issue with columns containing Tables as well as valid data. I believe when a column contains both, I cannot expand the column to get the table data to populate the column.
Is there something I can do to populate this table data? Everything that is sitting within the table is valid and will exist properly in the column. Each table will have at least one entry, but may include more than one entry and I'll need all.
Theres a few items in the table that are having this similar problem, but in the screenshot you can see the issue in both 'cve' and 'xref'.
When I filter out all the "non-table" data in the column, we can see I am finally allowed to Expand the column, but then I am missing critical data. I need the data in the tables to exist within the column.
I read https://community.powerbi.com/t5/Desktop/Expand-Column-Containing-Some-Tables/m-p/412915#M189511 but I could not get it to work for me. I am relatively new to power query so I may have been doing it wrong.
Here's one way to do it in the query editor. To see how it works, just create a blank query, open the Advanced Editor and replace the text there with the M code below.
let
Source = #table({"TableColumn"}, {{1}, {null}, {#table({"Value"}, {{1}, {2}})}}),
Custom1 = Table.TransformColumns(Source, {"TableColumn", each if _ is table then _ else #table({"Value"}, {{_}})}),
#"Expanded TableColumn" = Table.ExpandTableColumn(Custom1, "TableColumn", {"Value"}, {"Value"})
in
#"Expanded TableColumn"
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.