Description:
This function returns the count of dimensions of the specified cube. If a cube is not specified, then the function assumes the current cube.
This function is designed specifically to allow you to count number of dimensions in a specified cube that you wish to access from a specified database. The function takes as no parameter if the current cubes dimension are to be counted, however if the dimensions of another cube are to be counted then the name of that specific cube from within the database can be referenced in the function and the function will display the count of dimensions in the specified cube.
Syntax: CUBEDIMCOUNT
() ; or
CUBEDIMCOUNT (Cube)
Remarks
Example
=CUBEDIMCOUNT () |
-returns the number of dimensions in the current cube (4) |
=CUBEDIMCOUNT () |
-returns the number of dimensions in the current cube (3) |
=CUBEDIMCOUNT ("AR_Sales") |
-returns the number of dimensions in the specified cube "AR_Sales" (6) |
=CUBEDIMCOUNT ("AP_Trans) |
-returns the number of dimensions in the specified cube "AP_Trans" (5) |
Let us take the example of a cube in PowerOLAP which requires data that is the value for the count of dimensions in a cube accessed through the cube name or then simply as an empty parameter function, either of which option can be used as for the function. If in the same dimension in another member or in another dimension in another cube, you want to display this accessed CUBEDIMCOUNT value for the current cube or the cube supplied as a parameter to the function then it is appropriate to use the CUBEDIMCOUNT function to access the dimension count. In this case we can write a formula in the cube in PowerOLAP to access this value for the count of dimensions with the help of this function and write this value to another member that is supposed to hold this value as fact data or you can also write this value to a different dimension in a different cube.
The screen above shows 2 types of formulas for the CUBEDIMCOUNT function.
Both formulas write values into the "MetaDataValues" dimension, and one writes values to the "CubeDimensionCount" member while other writes it to the "RelatedCubeDimCount" member. In the first formula, the CUBEDIMCOUNT function takes no parameter, which is an empty call to the function. Because of not supplying any parameter to the function, the dimension count is automatically accessed from the current cube. The count of dimensions from the current cube is returned as the result of the function. In the second formula, the CUBEDIMCOUNT function takes one parameter, which is the name of a cube Because of supplying the cube name the dimension count is automatically accessed from the cube which is given to the formula as the parameter, in this case the "AR_Salesperson" cube. The count of dimensions in the specified cube is returned as the result of the function.