Granular Library (PQL)
Function Categories
These functions are used to apply datetime operations on the row or grain of the data 

These functions are used to perform derive details of the logged in user's identity and rights 

These functions are used to use logical operations on the row or grain of the data 

These functions are used to apply mathematical operations on the row or grain of the data 

These functions are used to apply text string operations on the row or grain of the data 
Overview
Granular or aggregate functions are a set of methods that are designed to operate on the GRAIN of the data feeding a data model. They are often also described as AGGREGATE functions, because they are about producing values from a table of data transactions by aggregating atomic results.
Granular aggregations and querying are usually done with languages like SQL.
As described in the PQL Calculation Overview, granular functions are part of a broad set of methods and capabilities for infusing your analytics with mathematical operations and logic. They can be used in conjunction with the Common function library to build deep, sophisticated methods to resolve data manipulation problems.
Syntax
Click here to see more details on the syntax needed to build PQL statements .
Adding Granular Calculations
There are 3 techniques for adding granular calculations in Pyramid:
1. Via the Data Model app, the calculation can be set as follows
2. Via the Discover app, the calculation can be built using the shortcut menus as follows:
3. Via the Formula tools in Formulate. The calculation can be added using the graphical formula builder, or directly via the script editor tool: