The Formulate module enables you to build custom KPIs, member lists, formulas, scripts, and more, using the Pyramid Query Language (PQL) or MDX. These can then be used in visualizations and queries to customize your content or inject formulas and values into your data - this includes Discover, Present, Publish and Illustrate content.
Formulate presents users with standalone entry points into the tools and wizards needed to create calculations an build business logic to drive analytic projects. Usually, its accessed by pro users wanting to build more advanced elements, versus using the point-and-click experiences found in Discover.
Formulate vs Discover Calculations
Formulate logic can also be built directly in Discover using tools like 'Quick Calcs'. These calculations are shortcuts to building the matching logic in Formulate. However, the Formulate tools remains the principle venue to create and edit such content - offering rich graphical and scripting tools
- Click here to see the Formulate Tutorials Video Library and overviews
Components in Formulate
The formulate module contains the following components:
- Formula: Create calculated (or 'custom') members and measures; these are user-defined calculations written in either PQL or MDX, and can be used to derive values anywhere in the query.
- List: A custom list (or set) is a user-defined group of elements, from a single attribute in a data model usually derived using formulas and logic. Lists are combined with a range of functions, such as slicing, filtering, sorting, and conditional logic. They can also be used to drive parameters (see below). Custom lists are written in either PQL or MDX.
- KPI: Create Key Performance Indicators (KPIs) and utilize them to identify trends and measure your organizational goals. KPIs are written in either PQL or MDX.
- Custom Columns: Create Custom Columns to dynamically extend the Semantic Model, adding custom-built, shareable attributes and 'base' measures to the model. Custom Columns are built in PQL.
- Parameters : Parameters are used to inject dynamic values (attribute elements, measures, numerical or text constants) into the query at runtime. They can be nested in other calculation tiers as part of calculated members, measures and lists, which are in-turn used in queries. This functionality enables users to trigger advanced logic and logical flows in the query at runtime through a point-and-click experience.
- Script: Write R and Python scripts for driving data cleansing logic or machine learning logic.
- Custom Visual: Create your own custom visualizations and share them with other users.
Common Formula Building Interfaces
The various formulate wizards and components have a common and similar interface allowing users to build advanced logic in a familiar way.
The components feature function libraries to help users create there formulations. Formulate logic is written in wither PQL or MDX, depending on your datasource: formulations built on MS OLAP, Tabular, and SAP BW data models are written in MDX; formulations built on other data models are written in PQL. See the links below for details on the available functions.
- PQL : review the PQL documentation to learn how to write expressions in PQL.
- MDX: review a summary of MDX functions available in Pyramid when working with MS OLAP, MS Tabular, and SAP BW data models.
Open Formulate by clicking on the orange Formulate icon in the navigation panel on the left.
You can open Formulate from within another module by clicking the arrow on the module tab and select New Formulation.
Next, select the Formulate component you want to access:
Opening a Data Model
Open the data model you want to use for your formulation by clicking on the explorer button
1. Choose the server.
- Use the search option (red box above) to find items by name.
- Use the drop down data type filter (yellow box above) by selecting a data source type to only display items of the specified data type.
- Use the sort by drop down (green box above) to arrange the servers by name, data source type, or to arrange by folder. The folder name can be created when creating the data source.
Note: The filter and sort selections are saved within the session, so any subsequent data server search will default to the selected sort and filter selections.
Note: By hovering your cursor over the server, the server name, type, and description will be displayed as a tooltip.
2. Select the required database within the given server.
3. Select the data model that you want to use for your formulation.