Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I am trying to expand the table to columns, but it is not working, how can I do that go through each cell and expand it to columns and skip the cell that has null or blank values.
Columns names are consistent everywhere.
I tried this code but no luck :
= Table.ExpandRecordColumn(#"Renamed Columns","Schedule F1", Table.ColumnNames(Table.FromRecords(List.Select(Table.Column(#"Renamed Columns","Schedule F1"), each _<> "" and _<> null))), Table.ColumnNames(Table.FromRecords(List.Select(Table.Column(#"Renamed Columns","Schedule F1"), each _<> "" and _<> null))))
Solved! Go to Solution.
Hi @parthpatel4
I guess you probably don't want to filter out rows with blank values, so you can first replace blank values with an empty table which only has column headers "BeginningAmt" and "EndingAmt". Then expand this table column.
let
Source = Table.FromRecords(
{[Name="Bill", Schedule F1=#table({"BeginningAmt", "EndingAmt"}, {{100,220}})],
[Name="Barb", Schedule F1=#table({"BeginningAmt", "EndingAmt"}, {{120,200}})],
[Name="Margo", Schedule F1=#table({"BeginningAmt", "EndingAmt"}, {{300,400}})],
[Name="Jeff", Schedule F1=#table({"BeginningAmt", "EndingAmt"}, {{300,180}})]},
type table [
Name = text,
Schedule F1 = table
]),
#"Appended Query" = Table.Combine({Source, Query2}),
// Replace blank values with an empty table
#"Replaced Value" = Table.ReplaceValue(#"Appended Query","",#table({"BeginningAmt", "EndingAmt"}, {{null,null}}),Replacer.ReplaceValue,{"Schedule F1"}),
// Expand table column
Custom1 = Table.ExpandTableColumn(#"Replaced Value", "Schedule F1", {"BeginningAmt", "EndingAmt"}, {"BeginningAmt", "EndingAmt"})
in
Custom1
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @parthpatel4
I guess you probably don't want to filter out rows with blank values, so you can first replace blank values with an empty table which only has column headers "BeginningAmt" and "EndingAmt". Then expand this table column.
let
Source = Table.FromRecords(
{[Name="Bill", Schedule F1=#table({"BeginningAmt", "EndingAmt"}, {{100,220}})],
[Name="Barb", Schedule F1=#table({"BeginningAmt", "EndingAmt"}, {{120,200}})],
[Name="Margo", Schedule F1=#table({"BeginningAmt", "EndingAmt"}, {{300,400}})],
[Name="Jeff", Schedule F1=#table({"BeginningAmt", "EndingAmt"}, {{300,180}})]},
type table [
Name = text,
Schedule F1 = table
]),
#"Appended Query" = Table.Combine({Source, Query2}),
// Replace blank values with an empty table
#"Replaced Value" = Table.ReplaceValue(#"Appended Query","",#table({"BeginningAmt", "EndingAmt"}, {{null,null}}),Replacer.ReplaceValue,{"Schedule F1"}),
// Expand table column
Custom1 = Table.ExpandTableColumn(#"Replaced Value", "Schedule F1", {"BeginningAmt", "EndingAmt"}, {"BeginningAmt", "EndingAmt"})
in
Custom1
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
You should be able to filter out rows with blank using the drop down filter button. Also, if each "Table" has a single row (like the other pic suggests), you can add a custom column with an expression like below to extract the first record (and then expand that).
= [Schedule T1]{0}
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 14 | |
| 13 | |
| 12 | |
| 7 | |
| 6 |