dimension.elementCount
Returns the number of leaf elements in a dimension.
Parent elements aren't included. Each leaf is counted once, even if it's in more than one hierarchy, and orphans (leaves that aren't in any hierarchy) are counted.
js
dimension.elementCount(dimensionName)Parameters
| Parameter | Type | Description |
|---|---|---|
dimensionName | string | The dimension's name. |
Returns
numberThe number of leaf 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");