dimension.size
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.size(dimensionName)Parameters
| Parameter | Type | Description |
|---|---|---|
dimensionName | string | The dimension's name. |
Returns
numberThe number of leaf elements, or 0 when the dimension can't be found. Use dimension.elementCount if you need to tell a missing dimension from an empty one.
Examples
js
const dimensionSize = dimension.size("time");