Description:
This function returns the largest value in a set of values.
Syntax: MAX (Number1, Number2,…)
Remarks
Example
The MAX function can be used in any database where you have stored values that you want to compare with each other and amongst those values the MAX value is returned then it is possible to do that with the help of this function. This function displays the maximum value from 2 or more numbers that are specified as parameters to the formula or it can be numbers in a range in the cube.
=MAX (9.99, 10.99) |
-MAX value amongst the two given positive numbers (10.99) |
=MAX ("a", "b") |
-MAX value amongst the two given text values (always "0") |
=MAX ("range1", "range2") |
-MAX value amongst the two number values that exist in the ranges referenced in the function. |
Let us take the example of a cube in PowerOLAP which has data which is the information in numbers amongst which you want to calculate the "MAX" value. If in the same dimension in another member or in another dimension in another cube, you want to display the calculated MAX value for the number parameters, then it is appropriate to use the MAX function to calculate the MAX value between then numbers. In this case we can write a formula in the cube in PowerOLAP to pull in values from 2 or more members of a dimension of a cube and write them to the formula and derive the values for the other member which holds the MAX 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 "MAX" member in the NumFunctionValues dimension (data is at the intersection with the MathValue member of the Version dimension). This is done by calculating the MAX values from the two parameters given to the function. The parameters belong to the "NumFunctionValues" dimension. The MAX function takes the "NUMBER1" and the "NUMBER2" members as the parameters which are given to the function and it calculates the MAX value from amongst these members and the calculated result is written into the same cube in the "MAX" member of the "NumFunctionValues" dimension.