Skip to content

dimension.elementCount ​

Returns the number of elements in a dimension.

js
dimension.elementCount(dimensionName)

Parameters ​

ParameterTypeDescription
dimensionNamestringThe dimension's name.

Returns ​

number

The number of elements, or -1 when the dimension can't be found. Use dimension.size if you'd rather get 0.

Examples ​

js
const elementCount = dimension.elementCount("time");