Minimum (PQL)
Executes minimum aggregation on a column of data from the model. The column must contain numerical data for it to be functional.
- Returned Output: Numeric
- Library: PQL \ Granular \ Aggregate
- Version: 2018.00.000
- Compatibility: Pyramid Query Language (PQL) data sources
Syntax
Syntax Alternatives
* Click on the function's arguments above for more details on the input values.
Comments
- The "measure" column needs to be the name of the column in the model [table].[column name] or it can be an existing measure in the model [measures].[column name].
- For details on how to employ and use this function see the granular calculation overview.
Different Function types
- This function is like the SQL min function; calculating the minimum of a column of data in your query or model .
- If you wish to find the minimum value for the elements in a specified SET or LIST from a hierarchy, use this semantic function.
- To use a simple minimum mathematical operation on a list of numbers, use the Common library function.
Examples
To create a new measure that is the minimum of expenses in the model, using the sample demo model:
Minimum( [data].[Expenses] )
or:
Min( [measures].[data Expenses] )
The mechanics of this function are shown below. According to the grid, the minimum expense across all 'Accessory' transactions is $3.20. This was calculated by looking at every row for accessory transactions and finding the one with the lowest value. This produces a different result to the Min([LIST]) function which would find the minimum value from the list of items presented instead.