Max (Decimal)
Name | Max (Decimal) |
Syntax | Max (Decimal first, Decimal second) |
Purpose | To return the greater of two decimal values. |
Description | Returns the maximum of two decimal values. |
Return Type | Decimal |
Parameters | first [System.Decimal] – First value second [System.Decimal] – Second value |
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F0%2520%2831%29.png&width=768&dpr=4&quality=100&sign=8b1d75ea&sv=1)
Example
In this example, we are passing decimal values to the function transformation object using a Variables object.
Note: This function also takes into account negative values.
Where,
first = 1.23
second = 3.21
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F1%2520%2832%29.png&width=768&dpr=4&quality=100&sign=367c0e4c&sv=1)
In the output window, you can see that the greater decimal value has been returned.
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F2%2520%2832%29.png&width=768&dpr=4&quality=100&sign=916e5cf9&sv=1)