Forum Discussion
ValeriaBreve
2 years agoPost Partisan
CountRows in a nested table
Hello, I need to count the rows of each nested table (in a column "All") of a query. I am trying to do so by adding a custom column into the nested tables and, for each cell, adding the total row c...
- 2 years ago
Hi ValeriaBreve, check this:
let Source = Table.FromList({#table(null, {{"a"}}), #table(null, {{"a"}, {"b"}})}, Splitter.SplitByNothing(), type table[All=table]), Ad_RowCountOuterColumn = Table.AddColumn(Source, "RowCount as Outer Column", each Table.RowCount([All]), Int64.Type), Ad_RowCountToAllTablesInner = Table.TransformColumns(Ad_RowCountOuterColumn, {{"All", each Table.AddColumn(_, "RowCount", (x)=> Table.RowCount(_), Int64.Type), type table}}) in Ad_RowCountToAllTablesInner
ValeriaBreve
2 years agoPost Partisan
dufoq3 Thank you!
dufoq3
2 years agoCommunity Champion
You're welcome Valeria.