Description:
This function returns an evenly distributed random number greater than or equal to 0 and less than 1. A new random number is returned every time the worksheet is calculated.
Syntax: RAND ()
Remarks
Example
The RAND function can be used in any database where you want to populate the values into a cell in a cube and the values should be random numbers generated every time the sheet is recalculated. The RAND function thus generates any random number and returns it as the result of the function. The random number is always greater than 0 and less than 1 but it can be manipulated by adding extra arguments to the formula. The value that is returned with the help of this function is never the same and will change every time a new calculation is directed, which is an F9.
=RAND () |
-A random number value automatically generated by the function. (0.705) |
=RAND () |
-A random number value automatically generated by the function. (0.412) |
=RAND () * 93 |
-A random number value automatically generated by the function multiplied by 93. (90.702) |
Let us take the example of a cube in PowerOLAP which requires data which is that is the information in numbers that is any "Random" number. If in the same dimension in another member or in another dimension in another cube, you want to display the calculated RAND value, then it is appropriate to use the RAND function to calculate any RANDOM NUMBER value. In this case we can write a formula in the cube in PowerOLAP to calculate any random number with the help of this function and write this value to the other member that is supposed to holds the RAND value or you can also do this for a different dimension in a different cube.
The formula above writes values into the "NumFunctionValuesData" cube to the " RAND " member in the NumFunctionValues dimension (data is at the intersection with the MathValue member of the Version dimension). This is done by generating a random number that in this case is multiplied by 100.The RAND function takes no parameters whatsoever. This function simply calculates a random number each time the formula is recalculated. The value returned by the RAND function can be manipulated and be accordingly increased or decreased as desired. If you don't want a new random number to be generated every time the worksheet is recalculated, then it is possible to copy the values and paste them back into the same cell or another cell after disabling the " RAND" formula function. In this way it is possible to keep one randomly generated value and store this value permanently in the cube. The formula above calculates a RANDOM number and adds a 100 to it and subsequently this value is written to the RAND member of the "NumFunctionValues" dimension.