Pricefx Classic UI is no longer supported. It has been replaced by Pricefx Unity UI.

 

Rollups

Rollups are persisted Analytics queries aggregating measures along one or more dimensions.

Comparison with Data Tables

Rollups and Data Tables have a certain functionality overlap. They both show rows contained in Data Feeds, Data Sources or Datamarts but the form and other related features are slightly different.  

AreaRollupData Table
Displayed data

Shows the data in an aggregated form.

Rollups do not have to load all the data at once (the browser downloads approx. 300 rows in one go and as you scroll down, it fetches another batch of rows only when needed).

Shows the lowest level rows. 

Data Tables can do aggregation too but they need to load all the data in the browser to be able to show it.

Customization
Can be more customized (e.g. using a dictionary).
Comparison tools Has built-in pivot and comparison support. 
Performance

Loads large amounts of data faster.

But pivoting can increase the query time significantly.

It is slow when loading more than just a few 100s of rows.
Data Source creationYou can create a Data Source modeled on a Rollup, in which you can (schedule to) load data from the Rollup query ('sort of a materialized rollup').


Managing Rollups

The Rollup Query Editor lists on the left-hand side the already persisted rollups. To open a Rollup, select it in the 'Rollup Queries' section, and click the Edit button at the bottom of the grid. Double clicking a Rollup row also opens it.

(info) For step-by-step instructions see How to Create Rollup.

Pivot & Compare

You will often need to compare data for different periods, regions etc. In the following example, we aggregate sales numbers along region and year. By choosing the Invoice Year as the pivot, it is now easier to compare results for subsequent years:

If, in addition, the Compare option is checked against a measure, the query will calculate and return the delta of the aggregated measure between the different periods:

(tick) To make more room for the Data panel, the 'Controller' (the two middle panels) can be hidden by clicking the 'Toggle controller' icon at the top right of the Data section.

Rollups as Source for Analysis

Currently, Rollups can be accessed and viewed in the UI in these areas:

  • Rollups Manager as accessed in the main Analytics menu
  • Analytics Simulations, where they provide comparisons over multiple scenarios on some aggregated level
  • Optimization, in a multiple scenario context similar to Analytics Simulation
  • Data Source where you can create a Data Source modeled on a Rollup, in which you can (schedule to) load data from the Rollup query ('sort of a materialized rollup')
  • Calculation Data Loads where a rollup can be used a source

Rollups are designed to be used in a calculation logic context, wherever Analytics queries are used. They are very useful in dashboard definitions, where you often need to show comparisons (i.e., using the Pivot option) of summary (aggregated) data over different time periods, regions, etc.

Here is some sample code:

Rollup query sample code
def dmCtx = api.getDatamartContext()
def dm = dmCtx.getRollup("Rollup_1")
def q = dmCtx.newQuery(dm)
q.select("CustomerID")
q.select("ProductID")
q.select("SUM(InvoicePrice)", "Revenue")
q.select("SUM(Quantity)", "Volume")
api.trace("Query", null, q)
def result = dmCtx.executeQuery(q)
api.trace("Data", null, result?.data)
return dmCtx.buildQuery(q)

which when used in a Dashboard results in:

Or when used in a CalculationResultGrid or FormulaTestWindow, it is rendered as a clickable 'View' icon:

Found an issue in documentation? Write to us.

Â