SamplePercent (PQL)
                                    Returns a sample of approximately N% of the items from the specified list.
- Returned Output: List
 - Library: PQL \ Semantic \ Statistical
 - Version: 2023.13.000
 - Compatibility: Pyramid Query Language (PQL) data sources
 
Syntax
* Click on the function's arguments above for more details on the input values.
Comments
- The List parameter should be a list or set of elements from an existing hierarchy in the model.
 - The numeric parameter indicates what percentage of values should be returned from that hierarchy as a numeric expression.
 - For details about how to employ and use this function, see the semantic calculation overview.
 
Different Function types
- There are two Sample functions; this function returns a percentage of the total values as a sample, while the other returns a set number of values. For details, see Sample (PQL).
 
Examples
This example returns 10% of Transaction IDs as a random sample:
SamplePercent([data].[transactionID].allMembers(), 10)