Marcel Beugelsdijk on 20 Jan 2017 14:33:54
When aggregating a table column with nested tables, count returns the number of records in the nested tables.
However, if a nested table is empty, 1 is returned instead of 0.
The generated code for aggregation is for example:
Table.AggregateTableColumn((Table1,"Tables", {{"Order",List.Count, "Count of Order"}})
As a workaround, List.Count can be replaced by List.NonNullCount.
Strange enough and likewise, List.Count in combination with Table.TransformColumns, returns 0 for empty nested tables, e.g.
Table.TransformColumns((Table1,{{"Tables", each List.Count(_[Order]), type number}})
- Comments (1)
RE: List.Count returns 1 for empty tables in Table.AggregateTableColumn
Have passed this along to the team.