OpenBI Docs Buy

Table.ColumnCount

How many columns a table has.

Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Table.ColumnCount(table as table) as number
ParameterTypeDescription
tabletableThe table to look at.

Returns

number. The number of columns; 0 for a table without any.

Examples

Three columns

Table.ColumnCount(#table({"Product", "Price", "Units"}, {{"Chair", 50, 4}, {"Desk", 120, 1}, {"Lamp", 30, 6}}))
3

Table.RowCount, Table.ColumnNames, Table.HasColumns.

Last updated · OpenBI Studio 0.3.79