Forum Discussion
Sheila8569
Nov 04, 2022Copper Contributor
Power Query - New Column added - Column Content now showing
Issue: Column Header will load, but the content of the column will not load.
After using power query to load more than 100 tables, I needed to add a column at the beginning of each table name Group. The header will load to the query, but the column content will not load.
let
Source = Excel.CurrentWorkbook(),
#"Filtered Rows" = Table.SelectRows(Source, each not Text.Contains([Name], "Print_")),
#"Removed Bottom Rows" = Table.RemoveLastN(#"Filtered Rows",1),
#"Removed Top Rows" = Table.Skip(#"Removed Bottom Rows",2),
Data = #"Removed Top Rows"[Content],
Headers = List.Distinct(List.Combine(List.Transform(Data, Table.ColumnNames ) ) ),
#"Expanded Content" = Table.ExpandTableColumn(#"Removed Top Rows", "Content", Headers),
#"Removed Top Rows1" = Table.Skip(#"Expanded Content",1)
in
#"Removed Top Rows1"
The first photo shows the column "Group" with empty column content in the query.
This photo shows the table does have content in the column "Group".
- Riny_van_EekelenPlatinum Contributor
Sheila8569 Always difficult to diagnose such problem from a few screenshots only, but it seems that the column is named "Group" in the nested tables whereas you dynamically expand table columns (based on a list defined in the Headers step), one of which is called "GROUP".
Since you don't show the underlying data I can't tell where the column name GROUP comes from. But I'm sure you can.