Modeler IDE Reference Manual


About This Manual

This is the Reference Manual for the LogicBlox Modeler Configuration Tool which is also referred to as the Modeler IDE. This manual will lead you through the various aspects involved in configuring and building a LogicBlox Modeler IDE application.

Note

In this manual, we assume that you already are familiar with the Modeler and LogicBlox's implementation of online analytical processing (OLAP) and its three primary concepts: levels, dimensions, and measures. An overview of the basic concepts of the Measure Service can be found in the LogicBlox Core Reference Manual.

Part I. Getting Started

1. Installing LogicBlox development environment

The Modeler IDE is part of the LogicBlox platform. This section describes how to obtain and install LogicBlox, and how to start using the Modeler IDE.

1.1. Install your development environment

The following steps are required to install a Modeler IDE development environment:

  • Download the latest version of LogicBlox for your platform (Linux or macOS). Follow the installation instructions on the LogicBlox download page. More details on how to use the LogicBlox services can be found in the LogicBlox Core Reference Manual.
  • Download the latest integration build of Global Batch Manager (GBM). Extract the tarball gbm-integration.tgz into a directory, and make sure to set the environment variable GBM_HOME that points to this directory. Please note that the GBM application is currently only available for Infor internal use.

Tip

You need to have Open Java Development Kit (OpenJDK) version 11 installed. Download and install an OpenJDK distributions such as AdoptOpenJDK and Amazon Corretto.

You can check which version you have installed by running the following command:

$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)

You also need to have Python 3.5 or newer installed. Python can be downloaded from python.org. You can check which version you have installed by running the following command:

$ python --version

Python 3.5.8

1.2. Verify your development environment

You can verify your LogicBlox installation by checking the status of the services by typing the following command on the command-line:

$ lb services status

lb-compiler-server       : running
lb-server                : running
lb-web-server            : running

If your services are not running yet, you can start them with the following command:

$ lb services start

2. Using the Modeler IDE

The Modeler IDE is distributed together with LogicBlox as a stand-alone desktop application (Linux or macOS) called "Modeler Configuration Tool" and can be found in the ide directory of the LogicBlox installation package.

When you run the Modeler IDE for the first time you can choose between creating a new project and opening an existing project:

Select "Create Project" to create a new project or select "Open Project" to open an existing project.

Context-sensitive help

The Modeler IDE is equipped with a context-sensitive help function. Click on the "Help" option in the top menu bar to open the section of the reference manual that describes the view you're currently using.

Part II. Settings

1. Creating and Opening Projects

When you run the Modeler IDE for the first time you can choose between creating a new project and opening an existing project:

Select "Create Project" to create a new project or select "Open Project" to open an existing project. Previously created or opened Modeler IDE projects will be displayed under "Recent Projects". This allows you to quickly switch between projects.

The next time you start the Modeler IDE, it will automatically open the most recent project for you.

2. Modeler Application Settings

The "Settings" view of the Modeler IDE allows you to manage your Modeler application settings. Use the "Change" button to under "Current Project" to switch between Modeler IDE projects.

2.1. General Settings

The "General" tab of the "Settings" view contains the following settings:

SettingDescription
NameThe name of your Modeler IDE project.
WorkspaceThe name of the LogicBlox workspace used by your Modeler application.
Application PrefixThe application prefix for your Modeler application.
Project FileThe LogiQL project file which contains the configuration of the LogiQL library for your Modeler application.
Project FileThe LogiQL project file which contains the configuration of the LogiQL library that should be installed in the master workspace of your Modeler application.
Deployment User The LDAP account to be used for deployment via the NixOps Dashboard. Please note, deployment of your Modeler application via the Modeler IDE is not supported yet.

Add additional dependencies to the Modeler IDE project by selecting the "Add Dependency" option. Existing additional dependencies can be removed using the "Remove" button.

Tip

You may use environment variables in the pathname of your dependencies.

2.2. Modeling Features

The "Modeling Features" tab of the "Settings" view contains the following settings:

SettingDescription
Root Prefix The root URL prefix to add to all Modeler application routes as seen by the user in their browser.
Navigation Select the navigation tree of the Modeler application that should be used when the project is not using workbooks. When no navigation has been selected for this setting and the project is not using workbooks, the Modeler application will have an empty navigation tree. Navigations can be configured in the "Navigations" view of the Modeler IDE.
RealmThe name of the realm with which to authenticate.
Level Members Quantity Threshold The display limit of the level members size. The default for this setting is 10.000 level members.
Enable Data Import Enables the data import view for all users.
Disable Filter Query Disables the query that is used to determine if cells have failed to pass a filter. This option is typically used to analyze performance problems.
Enable JSON View Should the menu bar button to view a sheet in JSON mode be present.
Allow User Defined Sheets Allows users to create their own sheets or copy existing views.
Enable Levels Editing Allows all users to rename existing level members and modify level mappings when the project is not using workbooks.
Enable Levels Creation Allows all users to create new level members when the project is not using workbooks.

The following settings related to Modeler's Chart Mode can be made visible by selecting the "Show More" option under "Chart Settings".

Chart SettingDescription
Max Charts Threshold The maximum amount of cells that can be loaded. The default for this setting is 100.
Loading Cells Threshold The maximum number of charts that can be rendered on a view. The default for this setting is 10.000.

The following settings related to Modeler's collaboration features can be made visible by selecting the "Show More" option under "Collaboration".

Collaboration SettingDescription
Min Update Interval The minimum amount of time to wait to requery data after a collaboration message has been received (in seconds). The default for this setting is 0 seconds.
Max Update Interval The maximum amount of time to wait to requery data after a collaboration message has been received (in seconds). The default for this setting is 6 seconds.

The following settings related to Modeler's session timeouts can be made visible by selecting the "Show More" option under "Idle Time Values".

Idle Time Values SettingDescription
Idle Notification Time The number of seconds of inactivity before the Modeler application shows the inactivity message. The default for this setting is 1.800 seconds.
Idle Logout Time The number of seconds after the inactivity notification window has been displayed that the user has to resume their sesion before they are logged out. The default for this setting is 60 seconds.
Ignore Broadcasting Time The number of seconds of inactivity before the user's session stops responding to collaboration messages. The default for this setting is 300 seconds.

2.3. Branding

The "Branding" tab of the "Settings" view contains the following settings:

SettingDescription
Image URL Path to the image which should be used as the application logo.
Image Alt Text Alternative text for the image.
Redirect URLThe URL to redirect to when clicking on the logo of the Modeler application.

2.4. Internationalization

The "Internationalization" tab of the "Settings" view contains the following settings:

SettingDescription
Translations Debug A flag to enable i18n debug messages like missing keys.

Add a new languages as an available language to the Language Selector of your Modeler application by selecting the "+ Add Language" option. Each configured language has the following settings:

Language SettingDescription
Language A dropdown list with all languages that can be configured.
Value The locale identifier of the configured language (e.g. en-US for US English).
Name How the language name should be shown in the Language Selector of your Modeler application.

Remove a language configuration by clicking on the trash can icon.

2.5. URLs

The "URLs" tab of the "Settings" view contains the following settings:

SettingDescription
Login URL Custom URL of the login service.
Add Block Service URL Custom relative URL for the addblock service.
Exec Block Service URLCustom relative URL for the exec service.
Measure Service URL Custom relative URL for the measure service.
Measure Config URL Custom relative URL for querying measure formatting configuration.
Navigation Tree URL Custom relative URL for the navigation tree service.
User Broadcast URL Custom URL for the websocket service.
Current User URL Custom URL for the current user service that allows the "Current Users" widget of the Modeler application to correctly determine and display the other users looking at the same workbook.
LB Web Admin URL Custom relative URL the lb web admin service. This setting is typically used for testing purposes only.

Part III. Model

1. Measure Components

The "Measure Components" view of the Modeler IDE allows you to manage the measure components of your Modeler application. This view contains a table that gives you an overview of all configured measure components with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing measure component by clicking on its row in the table.
  • Change the order in which measure component will be applied in measure variants by dragging and dropping it to another position in the table.
  • Add a new measure component to your Modeler application by selecting the "+ New" option.
  • Remove an existing measure component by clicking on the trash can icon.

Use Cases

Measure components are commonly used in planning applications to automate the creation of Measure Variants. For example, a retail planning application will typically contain measures that hold Sales and Returns data. This data can be measured in various units of measurements (UOM) such as in units and dollar amounts. Furthermore, the dollar amount could be cost or retail.

Similarly, we can keep track of different versions of our measures. Versions are used to indicate whether measure values are actuals, planned, or approved. Common actual versions are This Year (TY), Last Year (LY), and Last Last Year (LLY) where TY data typically originates from an upstream system, and LY and LLY are time-shifted TY values. A common planned version is the Working Plan (WP) and a common approved version is the Approved Plan (AP).

In planning applications, you will usually also find users who have different roles within the planning process. For instance, a manager (MGR) could set targets for Sales and Returns at the Class,City,Week intersection. And on its turn, a planner (PLN) could work on a plan at the Sku,Store,Week intersection to achieve these targets.

Each measure component can be used to define Override Settings for certain aspects of a measure variant such as its value type, base intersection, and default aggregation method. Some examples:

  • Unit of measure (UOM) implies the value type and formatting of the measure variant. For instance, we probably want to use Decimal as the value type and Currency as the formatting for a measure variant that holds a retail dollar amount. For an example of how this measure component can be used in a measure rule and its inverses, see the section discussing the calculation of Net Sales.
  • Role implies the base intersection of the measure variant. For instance, the Sales measure variant for a planner could have Sku,Store,Week as its intersection while the measure variant for the manager has Class,City,Week as its base intersection. For an example of how this measure component can be used in a measure rule and its inverses, see the section discussing the calculation of Average Unit Retail.

1.1. Managing Measure Component Configuration

The following example shows how the measure component Unit of Measure (UOM) of an example application is configured in the Modeler IDE.

This view shows the list of measure component items that have been defined for this measure component: Retail dollar (R), Units (U), and Average Unit Retail (AUR).

The following user actions are supported in this view:

  • Manage the settings of the selected measure component by clicking on the pencil icon next to the measure component name.
  • Manage the configuration of an existing measure component item by clicking on its row in the table.
  • Add a new item to the measure component by selecting the "+ New" option.
  • Remove an existing item from the measure component by clicking on the trash can icon.

1.2. Measure Component Settings

When managing the settings of a measure component, the "Measure Components" view allows you to configure the following settings:

SettingDescription
NameThe name of the measure component.
LabelThe label of the measure component.

1.3. Measure Component Item Settings

When managing the settings of an item of a measure component, the "Measure Components" view allows you to configure the following settings:

SettingDescription
NameThe name of the item.
LabelThe label of the item.

Add a new override to this measure component item by selecting the "+ Add Override" option. The following overrides are supported:

Remove an override by clicking on the trash can icon.

1.4. Override Settings

1.4.1. Intersection

SettingDescription
Intersection The base intersection for measure variants that use this measure component item.

1.4.2. Value Type

SettingDescription
Value Type The value type for measure variants that use this measure component item.

1.4.3. Default Value

SettingDescription
Default Value The default value for measure variants that use this measure component item.

1.4.4. Aggregation Method

SettingDescription
Aggregation Method The default aggregation method for measure variants that use this measure component item.

1.4.5. Spread Method

SettingDescription
Spread Method The default spread method for measure variants that use this measure component item.

1.4.6. Empty Value

SettingDescription
Empty Value The empty value for measure variants that use this measure component item.

1.4.7. Format

SettingDescription
What Kind Of Format? The type of formatting to apply on data for measure variants that use this measure component item. The Modeler IDE shows a preview of the configured formatting.
Currency Symbol The currency symbol to use for this value (e.g. $ or ). This option is only visible when the formatting is of type "Currency".
Symbol Position The position of the currency or percent symbol in relation to the value (prefix or postfix). This option is only visible when the formatting is of type "Currency" or "Percent".
Space Separated Should Modeler add a space between the value and the currency or percent symbol? This option is only visible when the formatting is of type "Currency" or "Percent".
Precision Number of decimals to display. This option is only visible when the formatting is of type "Currency", "Percent", or "Number".
Scale Factor Check this option when Modeler should apply a scale factor on the value. This option is only visible when the formatting is of type "Currency" or "Number".
Thousands Separated? Check this option when Modeler should add a thousands separator to the formatted value. This option is only visible when the formatting is of type "Currency" or "Number".
Datetime The formatting to apply to the values of Datetime measures. By default, the formatting is defined as MM/DD/YYYY h:mm:ss a. All supported formatting options can be found here. This option is only visible when the formatting is of type "Datetime".

1.4.8. Rule And Inverse

SettingDescription
Rule Specify business logic which is used to calculate the values for the measure to which the override is being applied. This business logic is configured as CubiQL expressions. For more details, see the section about Measure Rules And Inverses.

Add one or more inverse groups for this rule override using the "+ Add Inverse Group" option. Each configured inverse group has the following settings:

Inverse Group SettingDescription
Choose a measure to update The measure that should be updated by this inverse rule.
Inverse rule Specify the the inverse rule for the measure to update. Inverse rules are configured as CubiQL expressions. For more details, see the section about Measure Rules And Inverses.

Access the following options by clicking on the ••• icon in the header of the inverse group:

  • By default, inverse groups are created with one inverse. Use the "+ Add Inverse" option to add more inverses to this inverse group. Inverses can be removed by clicking on the trash can icon on the far right side of the "Choose a measure to update" option.
  • Remove the inverse group configuration by clicking on the "Delete Inverse Group" option.

Change the precedence of the inverse groups by dragging and dropping the configured groups up or down to another position.

Please note that the Modeler IDE allows you to use additional variables in your CubiQL expression:

  • $$THIS. This variable will be substituted by the measure to which the override is being applied (e.g. Sales). Please note that the measure explosion syntax can also be applied to this variable (e.g. $$THIS_R).
  • $$BASE. This variable holds the base intersection of a measure variant based on the measure components along which a rule is being exploded.

1.4.9. Horizontal Alignment

SettingDescription
Horizontal Alignment Specify the horizontal alignment of data (left, right, or center) for measure variants that use this measure component item.

1.4.10. Base Ambiguous

SettingDescription
Base Ambiguous Should measure variants that use this measure component item be considered base ambiguous.

1.4.11. Read Only

SettingDescription
Read Only Should measure variants that use this measure component item be considered read only.

1.4.12. Cell Type

SettingDescription
Cell Type The cell type to use for measure variants that use this measure component item. This option is only relevant when the "Value Type" has been set to "Boolean" (Boolean Dropdown) or "String" (Address, Image, Link, Mouse Over Image, and Wrapped Text).

1.4.13. Derivation Type

SettingDescription
Derivation Type Specify the derivation type for measure variants that use this measure component item. By default, the Modeler IDE will assume the derivation type "Extensional" unless the measure variant has CubiQL rules. In that case, the Modeler IDE will assume the derivation type "DerivedAndStored". This setting allows you to override this default behavior of the Modeler IDE which is typically needed in situations where you use LogiQL to populate the measure.

2. Dimensions

The "Dimensions" view of the Modeler IDE allows you to manage the dimensions, levels, and hierarchies of your Modeler application. This view contains a table that gives you an overview of all configured dimensions with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing dimension by clicking on its row in the table.
  • Add a new dimension to your Modeler application by selecting the "+ New" option. After providing the basic dimension settings such as the name of the dimension, you can start configuring the levels and hierarchies of your dimension.
  • Remove an existing dimension by clicking on the trash can icon.

Global Validation

If there are errors in the dimension configuration, such as a missing default hierarchy, the Modeler IDE will report this via Global Validation.

2.1. Managing Dimension Configuration

The following example shows how the Calendar dimension of an example application is configured in the Modeler IDE.

On the left-hand side of the view, the Modeler IDE shows the list levels which have been defined for this dimension: Week, Month, Season, and Year.

On the right-hand side of the view, the Modeler IDE shows the list of hierarchies and their hierarchy mappings which have been defined for this dimension. A hierarchy is a named sequence of levels from the same dimension along which a measure can be aggregated. A hierarchy mapping is a many-to-one relation. For instance, in the Default hierarchy, each Week can only map to one Month, and each Month can only map to one Year.

Besides a default hierarchy, dimensions can be configured to have alternate hierarchies which describe an alternative sequence of levels along which a measure can be aggregated. In the example above, we've also defined a alternate hierarchy named Season where each Week maps to a Month, and each Month maps to a Season.

The Modeler includes an implicit top level (e.g. All Calendar) in the data model of the application. This level allows measures to be viewed by aggregating away the Calendar dimension entirely. For instance, a Sales measure (typically keyed by Sku, Store, Week) could be viewed regardless of their Week, Month, or Year, by viewing this measure at the All Calendar level.

The following user actions are supported in this view:

  • Manage the settings of the selected dimension by clicking on the pencil icon next to the dimension name.
  • Manage the settings of a configured level by right-clicking on the level field and selecting "Edit".
  • Add a new level to your dimension by selecting the "+ New" option under "Levels".
  • Remove an existing level by right-clicking on the level field and selecting "Delete".
  • Manage the settings of a configured hierarchy by clicking on the pencil icon in the hierarchy panel.
  • Change the order of the sequence of levels within a hierarchy by dragging and dropping level fields within the hierarchy panel. When the hierarchy panel contains more level fields than can be displayed on a single row, you can expand the hierarchy panel by clicking on the expand icon.
  • Remove a level from a hierarchy by dragging and dropping the level field out of the hierarchy panel.
  • Add a new level to a hierarchy by dragging and dropping its level field from the left-hand side of the view onto the hierarchy panel.
  • Add a new hierarchy to your dimension by selecting the "+ New" option under "Hierarchies".
  • Remove an existing hierarchy by clicking on the trash can icon in the hierarchy panel.

2.2. Dimension Settings

When managing the settings of a dimension, the "Dimensions" view allows you to configure the following settings:

SettingDescription
NameThe name of the dimension.
LabelThe label of the dimension.

2.3. Level Settings

When managing the settings of a level within a dimension, the "Dimensions" view allows you to configure the following settings:

SettingDescription
NameThe name of the level.
LabelThe label of the level.
Order By The ordering of the level members. The level can be ordered by the name, the label, or by configuring custom ordering. When using custom ordering, you should specify whether the values of the predicate used as the Order Attribute (e.g. Product:Sku_index) are imported using a TDX service or calculated using a LogiQL rule.
Custom Order Type This option becomes visible when you select "Imported Values" or "LogiQL Rule" in the "Order By" setting. The setting determines what value type is expected by the Order Attribute.
Generate Order Attribute When this option is checked, Modeler will generate an order attribute (e.g. Location:City_index) for this level. This option is automatically checked when you select "Custom" in the "Order By" setting.
Generate Order Predicates When this option is checked, Modeler will generate order predicates (e.g. Location:City_first, Location:City_last, Location:City_next, and Location:City_prev) for this level. This option is automatically checked when you select "Custom" in the "Order By" setting.
Generate Permission Predicates When this option is checked, Modeler will generate data access permission predicates for this level. Please note that these generated predicates must be populated for permissions to be applied. When permissions are enabled for one or more levels in the model, the Modeler IDE automatically takes care of adding the built-in modeler library permissions as a dependency of the generated_schema project.

The following settings can be made visible by selecting the "Show More" option under "Existing Predicates".

SettingDescription
Existing Id Predicate The existing Id predicate.
Existing Label Predicate The existing label predicate.

2.4. Hierarchy Settings

When managing the settings of a hierarchy within a dimension, the "Dimensions" view allows you to configure the following settings:

SettingDescription
NameThe name of the hierarchy.
LabelThe label of the hierarchy.
Order By The ordering of the level members. The level can be ordered by the name, the label, or by configuring custom ordering logic.
Default Specifies whether this hierarchy is the default hierarchy when the Measure Service is choosing paths through the dimension. Note that a dimension can only have one primary (default) hierarchy.

The following settings can be made visible by selecting the "Show More" option under "First/Last".

SettingDescription
Has First? Should this hierarchy have an alternate hierarchy that creates a mapping from one child to its parent, if that child is the "first" child of its parent.
Has Last? Should this hierarchy have an alternate hierarchy that creates a mapping from one child to its parent, if that child is the "last" child of its parent.

Tip

The Modeler IDE requires you to mark one hierarchy as the default hierarchy. By convention, we always name the default hierarchy of a dimension Default.

3. Intersections

The "Intersections" view of the Modeler IDE allows you to manage the intersections of your Modeler application. This view contains a table that gives you an overview of all configured intersections with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing intersection by clicking on its row in the table.
  • Add a new intersection to your Modeler application by selecting the "+ New" option.
  • Remove an existing intersection by clicking on the trash can icon.

Global Validation

If there are errors in the intersection configuration, such as the existence of an intersection referring to a deleted level, the Modeler IDE will report this via Global Validation. Validation errors will also be reported in the "Status" column of the table in "Intersections" view.

3.1. Managing Intersection Configuration

The following example shows how the SkuStoreWeek intersection of an example application is configured in the Modeler IDE.

On the left-hand side of the view, the Modeler IDE shows a list of all dimensions and their levels which can be added to the intersection.

On the right-hand side of the view, the Modeler IDE shows the levels which are selected to be part of this intersection.

The following user actions are supported in this view:

  • Restrict the number of visible levels in the left-hand side of the view by searching for specific levels using the "Search" box.
  • Add a new level to the intersection by dragging the level field from the list of levels to the list of selected levels.
  • Change the position of a level in the intersection by dragging and dropping it to another position in the list of selected levels.
  • Remove a new level from the intersection by dragging the level field out of the list of selected levels.

4. Composite Aggregations

The "Composite Aggregations" view of the Modeler IDE allows you to manage composite aggregation methods for your Modeler application. This view contains a table that gives you an overview of all configured composite aggregation methods with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing composite aggregation method by clicking on its row in the table.
  • Add a new composite aggregation method to your Modeler application by selecting the "+ New" option.
  • Remove an existing composite aggregation method by clicking on the trash can icon.

4.1. Composite Aggregation Settings

When managing the settings of a composite aggregation method, the "Composite Aggs & Spreads" view allows you to configure the following settings:

SettingDescription
Name The name of the composite aggregation method.
Label The label of the composite aggregation method.

Add a new dimension along which you want a measure to be aggregated with the "+ Add Item" option. Each configured dimension has the following settings:

SettingDescription
Dimension The dimension along which you want to aggregate.
Method The aggregation method you want to use for this dimension.

Remove a dimension configuration by clicking on the trash can icon.

Use Cases

In planning applications, commonly-used composite aggregation methods for inventory calculations are BOP (Beginning of period) and EOP (End of period).

  • This composite aggregation method BOP (shown in the screenshot above) sums up all values along the non-Calendar hierarchies. The value at aggregate Calendar is the same value as the first child period's value belonging to the aggregate parent (e.g. inventory at the beginning of the Calendar:Year, Calendar:Month, or Calendar:Week).
  • This composite aggregation method EOP also sums up all values along the non-Calendar hierarchies. In this case, the value at aggregate Calendar is the same value as the last child period's value belonging to the aggregate parent (e.g. inventory at the end of the Calendar:Year, Calendar:Month, or Calendar:Week).

5. Composite Spreads

The "Composite Spreads" view of the Modeler IDE allows you to manage composite spread methods for your Modeler application. This view contains a table that gives you an overview of all configured composite spread methods with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing composite spread method by clicking on its row in the table.
  • Add a new composite spread method to your Modeler application by selecting the "+ New" option.
  • Remove an existing composite spread method by clicking on the trash can icon.

5.1. Composite Spread Settings

When managing the settings of a composite spread method, the "Composite Aggs & Spreads" view allows you to configure the following settings:

SettingDescription
Name The name of the composite spread method.
Label The label of the composite spread method.

Add a new dimension along which you want a measure to be spread with the "+ Add Item" option. Each configured dimension has the following settings:

SettingDescription
Dimension The dimension along which you want to spread.
Method The spread method you want to use for this dimension.

Remove a dimension configuration by clicking on the trash can icon.

Use Cases

In planning applications, the aggregation methods BOP (Beginning of period) and EOP (End of period) are typically configured together with composite spread methods.

  • This composite spread method BOP (shown in the screenshot above) places an edited value into the first logical child dimension beneath the level of the edit (e.g. if the user updates a measure on the Calendar:Month level, the value is spread down to the first day in that Calendar:Month).
  • This composite spread method EOP places an edited value into the last logical child dimension beneath the level of the edit. (e.g. if the user updates a measure on the Calendar:Month level, the value is spread down to the last day in that Calendar:Month).

6. Measures

The "Measures" view of the Modeler IDE allows you to manage the measures of your Modeler application. On the left-hand side of the view, the Modeler IDE shows a browser that contains all the measures and their measure variants:

Measures and measure variants that are often accessed can be bookmarked by the user. These bookmarked measures and measure variants can be found in the "Bookmarks" tab of the browser for quick access:

The following user actions are supported in the browser:

  • Expand or collapse the list of measure variants for a measure in the browser by using the expand/collapse icon in front of the measure name.
  • Restrict the number of visible measures and measure variants in the browser by searching for specific measures and/or measure variants using the "Search" box. The Modeler IDE will highlight search terms within the search results in the browser.
  • Manage the configuration of an existing measure or measure variant by clicking on its row in the table.
  • Add a new measure to your Modeler application by selecting the "+ New" option.
  • Reveal additional options for an existing measure by clicking on the ••• button on its row. This context menu includes the following user actions:
    • Add a new measure by copying the selected measure (including its measure variants) using the "Copy" option. This copy functionality eliminates the tedious and error-prone process of manually repeating the creation of similar measures and their measure variants, rules, and overrides.
    • Remove the selected measure by using the "Delete" option.
  • Reveal additional options for an existing measure variant by clicking on the ••• button on its row. This context menu includes the following user actions:
    • Add a new measure variant by copying the selected measure variant including its rules and overrides using the "Copy" option.
    • Remove the selected measure variant using the "Delete" option.
  • Bookmark a measure by clicking on the bookmark icon on its row. For measures with measure variants, this user action will automatically bookmark all measure variants of the measure.
  • Bookmark a measure variant by clicking on the bookmark icon on its row.
  • Export the measure configuration of the Modeler IDE to a CSV file using the "Export to CSV" option.
  • Switch between the list of all measures and their variants and the list of bookmarked measures and variants by selecting either the "All Measures" or the "Bookmarks" tab of the measures browser.

6.1. Managing Measure Configuration

The following example shows how the Sales measure of an example application is configured in the Modeler IDE.

The "Measures" view allows you to configure the following settings:

SettingDescription
NameThe name of the measure.
LabelThe label of the measure.
Locks Selection of the lock(s) that should be applied to the measure. These locks can be configured in the "Locks" view of the Modeler IDE.
Concrete measure Determines whether the Modeler IDE should generate derived measures using measure variants for this measure. When a measure doesn't use measure variants, we call the measure a concrete measure.

The "Measures" view supports the following additional user actions for concrete measures:

  • Manage the settings of the concrete measure.

The view supports the following additional user actions when the measure uses measure variants:

  • Manage the configuration of an existing measure variant by clicking on its row in the table.
  • Add a new measure variant for this measure to your Modeler application by selecting the "+ New" option.
  • Remove an existing measure variant by clicking on the trash can icon.
  • Open a preview of all derived measures that will be generated for all measure variants of this measure by selecting the "Preview All" option.
  • Add a new Label Override for this measure by selecting the "+ Add Label Override" option.

6.1.1. Managing Label Overrides

Add a new label override to this measure by selecting the "+ Add Label Override" option. Label overrides allow you to relabel one or more measure component item labels for the derived measures that will be generated for the measure variants of this measure.

When managing the settings of a label override, the "Measures" view allows you to configure the following settings:

Label Override SettingDescription
Measure Component The measure component item to relabel.
Label Override The new label for the measure component item. Keeping this setting empty will result in the removal of the measure component item label (e.g. "This Year" or "Retail") from the label of your derived measures.

Remove an existing label override by clicking on the trash can icon.

6.2. Concrete Measure Settings

6.2.1. Measure Definition

When managing the settings of a concrete measure, the "Measures" view allows you to configure the measure definition:

SettingDescription
IntersectionThe base intersection of the measure.
Value TypeThe value type of the measure.
Default ValueThe default value of the measure.
Derivation Type Specify the derivation type of the measure. By default, the Modeler IDE will assume the derivation type "Extensional" unless the measure has CubiQL rules. In that case, the Modeler IDE will assume the derivation type "DerivedAndStored". This setting allows you to override this default behavior of the Modeler IDE which is typically needed in situations where you use LogiQL to populate the measure.
Percent Parent Should Modeler compute percent-parent values for this measure? A percent-parent measure contains percentage values, computed using the value of a measure at one intersection, divided by the value of that same measure, at a "parent" intersection. For example, we may want to measure the percentage of Sales for one product, over Sales of all products, or the percentage of Sales for one Subclass, over the Sales of its parent Class.
Base Metric The measure which should be used as the percent base for the percent-parent calculation. This is the measure we are interested in computing percentages of. This option is only visible when the "Percent Parent?" setting is enabled.
Dimension The dimension along which to compute the percent-parent. For instance, specifying Product for this dimension would mean the resulting percent-parent measure is defined to compute the percentages of Sales of one level in the Product dimension, over a "parent" level in the Product dimension (e.g. Sku sales over sales of its parent Class). This option is only visible when the "Percent Parent" setting is enabled.
Aggregation Method The default aggregation method for the measure. This option is only visible when the "Percent Parent" setting is disabled.
Spread Method The default spread method for the measure. This option is only visible when the "Percent Parent" setting is disabled.
Spread By Metric Indicates which measure is to be used by the default spread method. This setting allows you to use the values of another measure when spreading data. For instance, whenever the value of Sales is edited, we may want to spread the value proportionally based on the value of a measure Gross Margin %, rather than using the values of existing Sales. This option is only visible when the "Spread Method" setting is set to "By Metric" and "Percent Parent" setting is disabled.

When the Value Type has been configured as numeric or datetime, settings related to Measure Formatting can be made visible by selecting the "Show More" option under "Measure Formatting".

6.2.2. Rule and Inverse

The "Measures" view allows the configuration of business logic which is used to calculate the values for the measure:

SettingDescription
Rule Specify business logic which is used to calculate the values for this concrete measure. This business logic is configured as CubiQL expressions. For more details, see the section about Measure Rules And Inverses.

Add one or more inverse groups for this rule using the "+ Add Inverse Group" option. Each configured inverse group has the following settings:

Inverse Group SettingDescription
Choose a measure to update The measure that should be updated by this inverse rule.
Inverse rule Specify the the inverse rule for the measure to update. Inverse rules are configured as CubiQL expressions. For more details, see the section about Measure Rules And Inverses.

Access the following options by clicking on the ••• icon in the header of the inverse group:

  • By default, inverse groups are created with one inverse. Use the "+ Add Inverse" option to add more inverses to this inverse group. Inverses can be removed by clicking on the trash can icon on the far right side of the "Choose a measure to update" option.
  • Remove the inverse group configuration by clicking on the "Delete Inverse Group" option.

Change the precedence of the inverse groups by dragging and dropping the configured groups up or down to another position.

6.2.3. Cell Formatting

The following settings related to Cell Formatting can be made visible by selecting the "Show More" option under "Cell Formatting".

SettingDescription
AlignmentSpecify the horizontal alignment of data (left, right, or center) for this measure.
Cell Type The cell type to use for this measure. Note that some cell types require special formatting (JSON) of the data to render data correctly. This option is only visible when the "Value Type" setting is set to "Boolean" (Boolean Dropdown) or "String" (Address, Image, Link, Mouse Over Image, and Wrapped Text).
Empty ValueThe empty value for this measure.
Read Only?Should this measure be considered read only.
Base Ambiguous?Should this measure be considered base ambiguous.

6.3. Configuring Measure Variants

The following example shows how the measure variant AUR_<TY,WP,LY>_<PLN,MGR> of the Sales measure of an example application is configured in the Modeler IDE.

The following user actions are supported in the right-hand side of the view:

  • Edit the measure component configuration for this measure variant by selecting the "Edit Components" option.
  • Inspect the measure properties based on the overrides originating from the selected measure component items by selecting the "Show More" option under the "Measure Properties" section on the "General" tab.
  • Edit the measure rule configuration for this measure variant under the "Rule / Inverses" section on the "General" tab.
  • Manage the override configuration for this measure variant under the "Overrides" section on the "General" tab.
  • Preview the derived measures that will be generated for this measure by selecting the "Preview" tab.

6.3.1. Editing Measure Component Configuration

This view allows you to select along which measure components this measure variant should be exploded. The Modeler IDE will generate a derived measure for every combination of the selected items per measure components.

The following user actions are supported in this view:

  • Check a measure component item to add it to the measure variant configuration.
  • Uncheck a measure component item o remove it from the measure variant configuration.
  • Save changes by selecting the "Save" option.
  • Discard changes by selecting the "Cancel" option.

Use Cases

In planning applications, the average unit retail (AUR) is typically calculated for every version of the measure Sales. The following example shows the measure component configuration of the AUR_<TY,WP,LY>_<PLN,MGR> variant of the Sales measure of an example application.

For this measure variant, the Modeler IDE will generate the following derived measures of Sales:

Sales_AUR_TY_PLN
Sales_AUR_TY_MGR
Sales_AUR_WP_PLN
Sales_AUR_WP_MGR
Sales_AUR_LY_PLN
Sales_AUR_LY_MGR

The Unit of Measure (UOM) is fixed to only one single measure component item (AUR). For the Version component, the Modeler IDE should create a derived measure for each of the selected component items (TY, WP, and LY). For the Role component, the Modeler IDE should create a derived measure for each of the selected component items (PLN, MGR).

6.3.2. Editing Measure Rule and Inverses

The "Rule / Inverses" section of the measure variant configuration allows the configuration of business logic which is used to calculate the values for this measure variant. Add a rule for this measure variant using the "+ Add Rule / Inverses" option.

SettingDescription
Rule Specify business logic which is used to calculate the values for this concrete measure. This business logic is configured as CubiQL expressions. For more details, see the section about Measure Rules And Inverses.

Remove the rule configuration by clicking on the trash can icon on the far right side of the "Rule / Inverses" section header.

Add one or more inverse groups for this rule using the "+ Add Inverse Group" option. Each configured inverse group has the following settings:

Inverse Group SettingDescription
Choose a measure to update The measure that should be updated by this inverse rule.
Inverse rule Specify the the inverse rule for the measure to update. Inverse rules are configured as CubiQL expressions. For more details, see the section about Measure Rules And Inverses.

Access the following options by clicking on the ••• icon in the header of the inverse group:

  • By default, inverse groups are created with one inverse. Use the "+ Add Inverse" option to add more inverses to this inverse group. Inverses can be removed by clicking on the trash can icon on the far right side of the "Choose a measure to update" option.
  • Remove the inverse group configuration by clicking on the "Delete Inverse Group" option.

Change the precedence of the inverse groups by dragging and dropping the configured groups up or down to another position.

Please note that the Modeler IDE allows you to use additional variables in your CubiQL expression:

  • $$THIS. This variable will be substituted by the measure to which the override is being applied (e.g. Sales). Please note that the measure explosion syntax can also be applied to this variable (e.g. $$THIS_R).
  • $$BASE. This variable holds the base intersection of a measure variant based on the measure components along which a rule is being exploded.

6.3.3. Managing Override Configuration

Add a new override to this measure variant selecting the "+ Add Override" option. You can also use this configuration to override one or more configurations originating from the selected measure component items. The following overrides are supported:

Note that configuring a percent-parent override will automatically override the aggregation and spread methods set at the measure component level.

Remove an override by clicking on the trash can icon.

6.3.4. Previewing Derived Measures

The "Preview" tab of the measure variant configuration allows you to inspect the overrides (Override Configuration) and business logic (Measure Rules And Inverses) per derived measure that will be generated for this measure variant.

6.4. Exporting Measure Configuration

The "Measures" view allows you to export the measure configuration of the Modeler IDE to a CSV file using the "Export to CSV" option.

Use Cases

This functionality can be used by application developers to check the measure configuration without going into each measure and clicking the "Preview All" option. Additionally, business consultants can use this export to tracking progress and validate the application over time.

Example 1. 

The following example shows an export of the concrete and derived measures in the measure model of an example planning application.

Name,Label,Locks,Intersection,Value Type,Derivation Type,Aggregation Method,Spread Method,Spread By Metric,Default Value,Horizontal Alignment,Readonly,Base Ambigous,Empty Value,Percent parent - Base metric,Percent parent - Dimension,Format,Format - currency symbol,Format - precision,Format - is thousand separated,Format - symbol position,Format - is space separated,Format - scale factor,Workbooks,Commit Groups,Refresh Groups,Rule,Inverse 0 rule,Inverse 0 update measure,Inverse 1 rule,Inverse 1 update measure
Calendar:Month:Season,Month to Season,,,Named,Extensional,,,,,,,,,,,,,,,,,,,,,,,,,
Calendar:Month:Season_first,First Month to Season,,,Named,DerivedAndStored,,,,,,,,,,,,,,,,,,,,,,,,,
Calendar:Month:Season_last,Last Month to Season,,,Named,DerivedAndStored,,,,,,,,,,,,,,,,,,,,,,,,,
Calendar:Month:Year,Month to Year,,,Named,Extensional,,,,,,,,,,,,,,,,,,,,,,,,,
Calendar:Month:Year_first,First Month to Year,,,Named,DerivedAndStored,,,,,,,,,,,,,,,,,,,,,,,,,
Calendar:Month:Year_last,Last Month to Year,,,Named,DerivedAndStored,,,,,,,,,,,,,,,,,,,,,,,,,
Calendar:Week:Month,Week to Month,,,Named,Extensional,,,,,,,,,,,,,,,,,,,,,,,,,
Calendar:Week:Month_first,First Week to Month,,,Named,DerivedAndStored,,,,,,,,,,,,,,,,,,,,,,,,,
Calendar:Week:Month_last,Last Week to Month,,,Named,DerivedAndStored,,,,,,,,,,,,,,,,,,,,,,,,,
CurrentWeek,Current Week,,- Empty -,Named,,- None -,- None -,,,,,,,,,,,,,,,,,,,,,,,
ElapsedWeek,Elapsed Week,,Week,None,DerivedAndStored,Cover,Replicate,,,,,,,,,,,,,,,,,,,,,,,
Location:City:Country,City to Country,,,Named,Extensional,,,,,,,,,,,,,,,,,,,,,,,,,
Location:Store:City,Store to City,,,Named,Extensional,,,,,,,,,,,,,,,,,,,,,,,,,
NetSales_R_LY_MGR,Net Sales Retail Last Year Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,"{{ defaultValue = 0d }}
Sales_R_LY_MGR - Returns_R_LY_MGR","{{ defaultValue = 0d }}
Returns_R_LY_MGR + Input",Sales_R_LY_MGR,"{{ defaultValue = 0d }}
Sales_R_LY_MGR - Input",Returns_R_LY_MGR
NetSales_R_LY_PLN,Net Sales Retail Last Year Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,"{{ defaultValue = 0d }}
Sales_R_LY_PLN - Returns_R_LY_PLN","{{ defaultValue = 0d }}
Returns_R_LY_PLN + Input",Sales_R_LY_PLN,"{{ defaultValue = 0d }}
Sales_R_LY_PLN - Input",Returns_R_LY_PLN
NetSales_R_TY_MGR,Net Sales Retail This Year Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,"{{ defaultValue = 0d }}
Sales_R_TY_MGR - Returns_R_TY_MGR","{{ defaultValue = 0d }}
Returns_R_TY_MGR + Input",Sales_R_TY_MGR,"{{ defaultValue = 0d }}
Sales_R_TY_MGR - Input",Returns_R_TY_MGR
NetSales_R_TY_PLN,Net Sales Retail This Year Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,"{{ defaultValue = 0d }}
Sales_R_TY_PLN - Returns_R_TY_PLN","{{ defaultValue = 0d }}
Returns_R_TY_PLN + Input",Sales_R_TY_PLN,"{{ defaultValue = 0d }}
Sales_R_TY_PLN - Input",Returns_R_TY_PLN
NetSales_R_WP_MGR,Net Sales Retail Working Plan Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,"{{ defaultValue = 0d }}
Sales_R_WP_MGR - Returns_R_WP_MGR","{{ defaultValue = 0d }}
Returns_R_WP_MGR + Input",Sales_R_WP_MGR,"{{ defaultValue = 0d }}
Sales_R_WP_MGR - Input",Returns_R_WP_MGR
NetSales_R_WP_PLN,Net Sales Retail Working Plan Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,"{{ defaultValue = 0d }}
Sales_R_WP_PLN - Returns_R_WP_PLN","{{ defaultValue = 0d }}
Returns_R_WP_PLN + Input",Sales_R_WP_PLN,"{{ defaultValue = 0d }}
Sales_R_WP_PLN - Input",Returns_R_WP_PLN
NetSales_U_LY_MGR,Net Sales Units Last Year Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,"{{ defaultValue = 0d }}
Sales_U_LY_MGR - Returns_U_LY_MGR","{{ defaultValue = 0d }}
Returns_U_LY_MGR + Input",Sales_U_LY_MGR,"{{ defaultValue = 0d }}
Sales_U_LY_MGR - Input",Returns_U_LY_MGR
NetSales_U_LY_PLN,Net Sales Units Last Year Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,"{{ defaultValue = 0d }}
Sales_U_LY_PLN - Returns_U_LY_PLN","{{ defaultValue = 0d }}
Returns_U_LY_PLN + Input",Sales_U_LY_PLN,"{{ defaultValue = 0d }}
Sales_U_LY_PLN - Input",Returns_U_LY_PLN
NetSales_U_TY_MGR,Net Sales Units This Year Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,"{{ defaultValue = 0d }}
Sales_U_TY_MGR - Returns_U_TY_MGR","{{ defaultValue = 0d }}
Returns_U_TY_MGR + Input",Sales_U_TY_MGR,"{{ defaultValue = 0d }}
Sales_U_TY_MGR - Input",Returns_U_TY_MGR
NetSales_U_TY_PLN,Net Sales Units This Year Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,"{{ defaultValue = 0d }}
Sales_U_TY_PLN - Returns_U_TY_PLN","{{ defaultValue = 0d }}
Returns_U_TY_PLN + Input",Sales_U_TY_PLN,"{{ defaultValue = 0d }}
Sales_U_TY_PLN - Input",Returns_U_TY_PLN
NetSales_U_WP_MGR,Net Sales Units Working Plan Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,"{{ defaultValue = 0d }}
Sales_U_WP_MGR - Returns_U_WP_MGR","{{ defaultValue = 0d }}
Returns_U_WP_MGR + Input",Sales_U_WP_MGR,"{{ defaultValue = 0d }}
Sales_U_WP_MGR - Input",Returns_U_WP_MGR
NetSales_U_WP_PLN,Net Sales Units Working Plan Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,"{{ defaultValue = 0d }}
Sales_U_WP_PLN - Returns_U_WP_PLN","{{ defaultValue = 0d }}
Returns_U_WP_PLN + Input",Sales_U_WP_PLN,"{{ defaultValue = 0d }}
Sales_U_WP_PLN - Input",Returns_U_WP_PLN
Product:Sku:Color,Sku to Color,,,Named,Extensional,,,,,,,,,,,,,,,,,,,,,,,,,
Product:Sku:Subclass,Sku to Subclass,,,Named,Extensional,,,,,,,,,,,,,,,,,,,,,,,,,
Product:Subclass:Class,Subclass to Class,,,Named,Extensional,,,,,,,,,,,,,,,,,,,,,,,,,
Returns_R_LY_MGR,Returns Retail Last Year Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Returns_R_LY_PLN,Returns Retail Last Year Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Returns_R_TY_MGR,Returns Retail This Year Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Returns_R_TY_PLN,Returns Retail This Year Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Returns_R_WP_MGR,Returns Retail Working Plan Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Returns_R_WP_PLN,Returns Retail Working Plan Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Returns_U_LY_MGR,Returns Units Last Year Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Returns_U_LY_PLN,Returns Units Last Year Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Returns_U_TY_MGR,Returns Units This Year Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Returns_U_TY_PLN,Returns Units This Year Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Returns_U_WP_MGR,Returns Units Working Plan Manager,,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Returns_U_WP_PLN,Returns Units Working Plan Planner,,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Sales_AUR_LY_MGR,Sales Average Unit Retail Last Year Manager,HistoricalLock,"Class, City, Week",Decimal,,,,,0d,,,,0d,,,NUMBER,,2,True,,,1,,,,"fun [inter = {Class, City, Week}] in
    {{ defaultValue = 0d }} 
    Sales_R_LY_MGR[inter] / Sales_U_LY_MGR[inter]","fun [inter = {Class, City, Week}] in
    Input * Sales_U_LY_MGR[inter]",Sales_R_LY_MGR,"fun [inter = {Class, City, Week}] in
    Sales_R_LY_MGR[inter] / Input",Sales_U_LY_MGR
Sales_AUR_LY_PLN,Sales Average Unit Retail Last Year Planner,HistoricalLock,"Sku, Store, Week",Decimal,,,,,0d,,,,0d,,,NUMBER,,2,True,,,1,,,,"fun [inter = {Sku, Store, Week}] in
    {{ defaultValue = 0d }} 
    Sales_R_LY_PLN[inter] / Sales_U_LY_PLN[inter]","fun [inter = {Sku, Store, Week}] in
    Input * Sales_U_LY_PLN[inter]",Sales_R_LY_PLN,"fun [inter = {Sku, Store, Week}] in
    Sales_R_LY_PLN[inter] / Input",Sales_U_LY_PLN
Sales_AUR_TY_MGR,Sales Average Unit Retail This Year Manager,HistoricalLock,"Class, City, Week",Decimal,,,,,0d,,,,0d,,,NUMBER,,2,True,,,1,,,,"fun [inter = {Class, City, Week}] in
    {{ defaultValue = 0d }} 
    Sales_R_TY_MGR[inter] / Sales_U_TY_MGR[inter]","fun [inter = {Class, City, Week}] in
    Input * Sales_U_TY_MGR[inter]",Sales_R_TY_MGR,"fun [inter = {Class, City, Week}] in
    Sales_R_TY_MGR[inter] / Input",Sales_U_TY_MGR
Sales_AUR_TY_PLN,Sales Average Unit Retail This Year Planner,HistoricalLock,"Sku, Store, Week",Decimal,,,,,0d,,,,0d,,,NUMBER,,2,True,,,1,,,,"fun [inter = {Sku, Store, Week}] in
    {{ defaultValue = 0d }} 
    Sales_R_TY_PLN[inter] / Sales_U_TY_PLN[inter]","fun [inter = {Sku, Store, Week}] in
    Input * Sales_U_TY_PLN[inter]",Sales_R_TY_PLN,"fun [inter = {Sku, Store, Week}] in
    Sales_R_TY_PLN[inter] / Input",Sales_U_TY_PLN
Sales_AUR_WP_MGR,Sales Average Unit Retail Working Plan Manager,HistoricalLock,"Class, City, Week",Decimal,,,,,0d,,,,0d,,,NUMBER,,2,True,,,1,,,,"fun [inter = {Class, City, Week}] in
    {{ defaultValue = 0d }} 
    Sales_R_WP_MGR[inter] / Sales_U_WP_MGR[inter]","fun [inter = {Class, City, Week}] in
    Input * Sales_U_WP_MGR[inter]",Sales_R_WP_MGR,"fun [inter = {Class, City, Week}] in
    Sales_R_WP_MGR[inter] / Input",Sales_U_WP_MGR
Sales_AUR_WP_PLN,Sales Average Unit Retail Working Plan Planner,HistoricalLock,"Sku, Store, Week",Decimal,,,,,0d,,,,0d,,,NUMBER,,2,True,,,1,,,,"fun [inter = {Sku, Store, Week}] in
    {{ defaultValue = 0d }} 
    Sales_R_WP_PLN[inter] / Sales_U_WP_PLN[inter]","fun [inter = {Sku, Store, Week}] in
    Input * Sales_U_WP_PLN[inter]",Sales_R_WP_PLN,"fun [inter = {Sku, Store, Week}] in
    Sales_R_WP_PLN[inter] / Input",Sales_U_WP_PLN
Sales_R_LY_MGR,Sales Retail Last Year Manager,HistoricalLock,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Sales_R_LY_PLN,Sales Retail Last Year Planner,HistoricalLock,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Sales_R_TY_MGR,Sales Retail This Year Manager,HistoricalLock,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Sales_R_TY_PLN,Sales Retail This Year Planner,HistoricalLock,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Sales_R_WP_MGR,Sales Retail Working Plan Manager,HistoricalLock,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Sales_R_WP_PLN,Sales Retail Working Plan Planner,HistoricalLock,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,CURRENCY,$ ,2,True,prefix,,1,,,,,,,,
Sales_U_LY_MGR,Sales Units Last Year Manager,HistoricalLock,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Sales_U_LY_PLN,Sales Units Last Year Planner,HistoricalLock,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Sales_U_TY_MGR,Sales Units This Year Manager,HistoricalLock,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Sales_U_TY_PLN,Sales Units This Year Planner,HistoricalLock,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Sales_U_WP_MGR,Sales Units Working Plan Manager,HistoricalLock,"Class, City, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Sales_U_WP_PLN,Sales Units Working Plan Planner,HistoricalLock,"Sku, Store, Week",Decimal,,Total,Ratio,,,,,,,,,NUMBER,,,True,,,,,,,,,,,
Sales_VarLYtoTY_LY_MGR,Sales Variance LY to TY Last Year Manager,HistoricalLock,"Class, City, Week",Decimal,,- None -,- None -,,,,,,,,,PERCENT,,2,,,,,,,,"fun [inter = {Class, City, Week}] (E = (fun(M) in M)) in
 let (
   var_to   = (Sales_VarLYtoTY_TY_MGR[inter](E)),
   var_from = (Sales_VarLYtoTY_LY_MGR[inter](E))
 ) in
 {{ defaultValue = 0d }}
 (var_to - var_from) / var_from",,,,
Sales_VarLYtoTY_LY_PLN,Sales Variance LY to TY Last Year Planner,HistoricalLock,"Sku, Store, Week",Decimal,,- None -,- None -,,,,,,,,,PERCENT,,2,,,,,,,,"fun [inter = {Sku, Store, Week}] (E = (fun(M) in M)) in
 let (
   var_to   = (Sales_VarLYtoTY_TY_PLN[inter](E)),
   var_from = (Sales_VarLYtoTY_LY_PLN[inter](E))
 ) in
 {{ defaultValue = 0d }}
 (var_to - var_from) / var_from",,,,
Sales_VarLYtoTY_TY_MGR,Sales Variance LY to TY This Year Manager,HistoricalLock,"Class, City, Week",Decimal,,- None -,- None -,,,,,,,,,PERCENT,,2,,,,,,,,"fun [inter = {Class, City, Week}] (E = (fun(M) in M)) in
 let (
   var_to   = (Sales_VarLYtoTY_TY_MGR[inter](E)),
   var_from = (Sales_VarLYtoTY_LY_MGR[inter](E))
 ) in
 {{ defaultValue = 0d }}
 (var_to - var_from) / var_from",,,,
Sales_VarLYtoTY_TY_PLN,Sales Variance LY to TY This Year Planner,HistoricalLock,"Sku, Store, Week",Decimal,,- None -,- None -,,,,,,,,,PERCENT,,2,,,,,,,,"fun [inter = {Sku, Store, Week}] (E = (fun(M) in M)) in
 let (
   var_to   = (Sales_VarLYtoTY_TY_PLN[inter](E)),
   var_from = (Sales_VarLYtoTY_LY_PLN[inter](E))
 ) in
 {{ defaultValue = 0d }}
 (var_to - var_from) / var_from",,,,
ScaleWeek,Scale Week,,Week,Decimal,,Average,Replicate,,1d,,,,,,,CURRENCY,,2,True,prefix,,1,,,,,,,,
SimilarSku,Similar Sku,,Sku,Named,,Ambig,Replicate,,,,,,,,,,,,,,,,,,,,,,,
SkuDescription,Sku Description,,Sku,String,,- None -,- None -,,,,,,,,,,,,,,,,,,,,,,,
SkuIndex,Sku Index,,,Integer,DerivedAndStored,,,,,,,,,,,,,,,,,,,,,,,,,
SkuUserMask,Sku User Mask,,"Sku, User",None,,Collect,Replicate,,,,,,,,,,,,,,,,,,,,,,,
StoreIndex,Store Index,,,Integer,DerivedAndStored,,,,,,,,,,,,,,,,,,,,,,,,,

7. Expressions

The "Expressions" view of the Modeler IDE allows you to manage reusable CubiQL expressions for your Modeler application. These expressions are typically used for:

This view contains a table that gives you an overview of all configured CubiQL expressions:

The following user actions are supported in this view:

  • Manage the configuration of an existing expression by clicking on its row in the table.
  • Add a new expression to your Modeler application by selecting the "+ New" option.
  • Remove an existing expression by clicking on the trash can icon.

7.1. Expression Settings

When managing the settings of an expression, the "Expression" view allows you to configure the following settings:

SettingDescription
Name The name of the expression.
Expression The CubiQL expression configured for this expression.

8. Locks

The "Locks" view of the Modeler IDE allows you to manage reusable lock expressions for your Modeler application. These locks are typically used for:

This view contains a table that gives you an overview of all configured locks:

The following user actions are supported in this view:

  • Manage the configuration of an existing lock expression by clicking on its row in the table.
  • Add a new lock expression to your Modeler application by selecting the "+ New" option.
  • Remove an existing lock expression by clicking on the trash can icon.

8.1. Lock Settings

When managing the settings of a lock expression, the "Locks" view allows you to configure the following settings:

SettingDescription
Name The name of the lock.
Up On Some Specify how locked positions should roll up to a parent when the target's base intersection is higher than the lock expression's intersection and its children are partially locked. When this setting is checked, locking a single child (e.g. Week) locks the parent (e.g. Month). Otherwise, the parent will only be locked if all children are locked.
Lock The CubiQL expression configured for this lock.

9. Slides

The "Slides" view of the Modeler IDE allows you to manage reusable CubiQL slide configurations for your Modeler application.

This view contains a table that gives you an overview of all configured slides with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing slide by clicking on its row in the table.
  • Add a new slide to your Modeler application by selecting the "+ New" option.
  • Remove an existing slide by clicking on the trash can icon.

9.1. Slide Settings

When managing the settings of a slide, the "Slides" view allows you to configure the following settings:

SettingDescription
Name The name of the slide.
Predicate The name of the predicate which maps positions from one intersection to positions in another.
Derivation Type The derivation type of the predicate which maps positions from one intersection to positions in another.

Specify the source level of the slide using the "+ Add Source Level" option. Each configured source level has the following settings:

Source Level SettingDescription
Source Level The source level of the slide.

Remove a source level configuration by clicking on the trash can icon.

Specify the target level of the slide using the "+ Add Target Level" option. Each configured target level has the following settings:

Target Level SettingDescription
Target Level The target level of the slide.

Remove a target level configuration by clicking on the trash can icon.

Part IV. Services

1. Actions

The "Actions" view of the Modeler IDE allows you to manage the actions of your Modeler application. This view contains a table that gives you an overview of all configured actions with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing action by clicking on its row in the table.
  • Add a new action to your Modeler application by selecting the "+ New" option.
  • Remove an existing action by clicking on the trash can icon.
  • Add a new action by copying an existing action (including its configuration and service logic) by clicking on the copy icon in its row in the table.

Use Cases

The "Actions" view of the Modeler IDE allows you to configure several types of actions which can be used in your Modeler application:

  • Service actions can be used to configure and execute an inactive block of LogiQL code. Examples of service actions include manipulating data or calling an external service.
  • Workbook commit and refresh actions are used for performing a workbook commit or refresh. These actions are typically configured as Header Actions in workbook templates.
  • Copy actions can be used for copying data from one Measure Component to another. In planning applications, this type of action is typically be used for shifting, seeding, approval, and actualization:
    • Shifting is used to populate historical versions of measures while adjusting data from previous years to account for the fact that some holidays, like Easter, do not fall in the same week every year. This is significant for planning and forecasting applications because holidays tend to have very different consumer behavior (e.g. higher sales).
    • With seeding, the user is seeding their Working Plan (WP) with data from either a generated forecast or, more commonly, from Last Year’s (LY) data.
    • Approval is effectively the opposite. Once the Working Plan is completed, the planner commits the workbook. If the manager has reviewed the plan, then they can approve it by copying the Working Plan to an Approved Plan (AP) or Operating Plan (OP).
    • Actualization is almost identical to seeding except it happens as time passes. Every week you get new data (typically in batch) which is imported and then overwrites the Working Plan (WP) with This Year's (TY) data.

1.1. Action Settings

When managing the settings of an action, the "Actions" view allows you to configure the following settings regardless of the selected action type:

SettingDescription
NameThe name of the action.
LabelThe label of the action.
Action Type The type of the action. Based on the selected action type, the "Actions" view will display the following additional settings:
Is Disabled?This setting specifies whether the action button should be disabled by default.
Allow HTML? This setting determines whether a response message (set via predicate modeler:actions:ActionResponseStatus_message) may contain HTML markup. This setting is only visible when the selected action type is "Service".
ConfirmationShould the Modeler application present a confirmation modal to the user before executing the action.
Title Title of the confirmation modal. This setting is only visible when the setting "Has Confirmation" is checked.
Text Text of the confirmation modal. This setting is only visible when the setting "Has Confirmation" is checked.

1.2. Service Action Settings

The following example shows how a service action of an example application is configured in the Modeler IDE. This example action will return an informational response message (with HTML markup) that will be displayed in the Modeler application after successful execution.

The following settings related to service actions are visible when the selected action type is "Service":

SettingDescription
Action The inactive block of LogiQL which should be executed by this action.

1.3. Commit Action Settings

The following settings related to commit actions are visible when the selected action type is "Commit":

SettingDescription
Commit Group The name of the Commit Group used by this action when committing workbook data.

1.4. Refresh Action Settings

The following settings related to refresh actions are visible when the selected action type is "Refresh":

SettingDescription
Refresh Group The name of the Refresh Group used by this action when refreshing workbook data.

1.5. Copy Action Settings

The following screenshot contains an example of a copy action for actualization. This example action copies measure data from the This Year (TY) version to the Working Plan (WP) version. Measures related to the Manager (MGR) role have been exluded by adding an additional component mapping from the Planner (PLN) role to itself, which automatically excludes all other roles from the copy action.

Named Updates

For each copy action in the Modeler application, the Modeler IDE generates a named update in the measure service. This named update contains the following CubiQL update expressions:

  • Update expressions for the "Log Time In" and "Log User In" measures (see Action Tracking).
  • Update expression for each filter measure to remove all selected positions when the "Clear" option is enabled (see Filters).
  • Update expression per measure pair in the Mappings Preview.

The update expression for each measure pair uses a spread expression to copy over the data. For instance, to copy data from Sales_R_TY_PLN to Sales_R_WP_PLN as configured in the example action:

do spread Sales_R_TY_PLN into Sales_R_WP_PLN

When one or more filter measures have been configured for the action, they will be applied to the From measures using a dice expression. For instance, when we have both a SkuFilter and a WeekFilter configured:

do spread (dice Sales_R_TY_PLN by SkuFilter and WeekFilter) into Sales_R_WP_PLN

When a slide has been configured for shifting, this slide will applied on the data that's being copied over. For instance, when we have a slide TimeShiftTYtoLY configured:

do spread (collect (Sales_R_TY_PLN) by slide TimeShiftTYtoLY) into Sales_R_LY_PLN

The following example combines shifting with a scaling measure. The data is multiplied with the value in measure ScaleWeek before applying the slide and copying over the data.

do spread (collect (Sales_R_TY_PLN * ScaleWeek) by slide Product_Sku_Slide) into Sales_R_LY_PLN

1.5.1. Measure Component Mappings

Add a new measure component mapping to the copy action by selecting the "+ Add Mapping" option. Each configured component mapping has the following settings:

Component Mapping SettingDescription
From The Measure Component Item to copy data from.
To The Measure Component Item to copy data to.

Component mappings will not include measure pairs where the target measure has a rule or where the target is a percent-parent measure. These kind of measure pairs can be configured manually using Measure Mappings.

You can configure multiple component mappings for an action. For instance, to copy data of the Working Plan (WP) version to both the Operating Plan (OP) version and the Approved Plan (AP) version, you can create two component mappings. One from the Working Plan to the Operating Plan, and another one from the Working Plan to the Approved Plan.

When there is no mapping configured for a specific measure component, the Modeler IDE assumes you want to copy the data for all measure component items of this component. As an example, when you don't specify a mapping for Role, the action will copy over data for all roles such as Planner (PLN) and Manager (MGR). When you only want to copy data for specific measure component items of a measure component, you can configure that by specifying mappings for these items (e.g. add a mapping from Planner to Planner to only copy data for the Planner (PLN) role).

Remove a component mapping by clicking on the trash can icon.

1.5.2. Measure Mappings

Add a new measure mapping to the copy action by selecting the "+ Add Measures" option. This option allows you to add arbitrary mappings unrelated to any of the configured component mappings. Each configured measure mapping has the following settings:

Measure Mapping SettingDescription
From The concrete or derived measure to copy from.
To The concrete or derived measure to copy to.

Remove a measure mapping by clicking on the trash can icon.

1.5.3. Filters

Add a new filter to the copy action by selecting the "+ Add Filter" option. Each configured filter has the following settings:

Filter SettingDescription
Filter Measure The position-only measure that defines to positions that are eligible for being copied over by the action. The Modeler IDE will only show position-only measures in the list of available options.
Clear Clear the selected positions in the filter measure after copying data.

You can configure multiple filters for an action. Data for some position will only be copied over when the position matches all configured filters.

Remove a filter by clicking on the trash can icon.

1.5.4. Shifting

The following settings related to shifting are visible when the selected action type is "Copy":

SettingDescription
Slide A slide is a tool used by CubiQL to define an aggregation step outside of the predefined level-to-level mappings (e.g. Sku to Subclass) in the hierarchy of a dimension. To populate historical versions of measures, this slide needs to move positions of the Week or Month level of the Calendar dimension to different positions in the same Week or Month level. When mapping a Month to the next year, this is always going to be a 12-month offset, while Week mappings are typically implemented using the 4-5-4 calendar.
Scale Measure Specify a scaling measure that holds a modifier for every Week of the Calendar dimension which will adjust values up or down based on whether or not that week was a holiday week.

1.5.5. Action Tracking

The following settings related to action tracking (e.g. to keep track of who approved what and when) of copy actions are visible when the selected action type is "Copy":

SettingDescription
Log Time In The measure of value type Datetime that should be used to log the time of each execution of the action. The Modeler IDE will only show measures of this value type in the list of available options.
Log User In The measure of value type String that should be used to log the user that called the action. The Modeler IDE will only show measures of this value type in the list of available options.

Please note that the tracking measures "Log Time In" and "Log User In" are updated only at positions that were involved in the copy. For instance, let's say data at some position is eligible for being copied by the action based on the configured filters, then the tracking measures will only be updated for that position if there was indeed data available to copy over at the time of execution. So, if none of the "From" measures contain any data at some position, the tracking measures will also not be updated for that position.

1.5.6. Mappings Preview

The bottom of the "Actions" view shows a Mappings Preview based on the settings configured for this copy action.

You can exclude specific measure pairs from this copy action by checking the "Excluded" checkbox in its row.

2. TDX

Tabular data exchange (TDX) services are HTTP services that offer delimited files for download to export data from LogicBlox workspaces (GET) and support uploading delimited files for importing data (POST/PUT). The Modeler IDE automatically generates TDX services for importing and exporting the measure and hierarchy data of your Modeler application.

2.1. Managing TDX Service Configuration

The "TDX" view of the Modeler IDE contains a table which allows you to specify which services should be generated by the Modeler IDE.

TDX services for hierarchy data are always included in the table while services for measures are added to the table based on the selectors specified by the user. All services listed in the table will be generated unless they have been marked to be excluded from the selection.

The following user actions are supported in this view:

  • Add one or more filters using the "+ Add Selector" button. The Modeler IDE supports the following selectors for measure selection:
    • Select by measure component item(s)
    • Select by measure name(s)
    • Select by presence of rules and/or inverses
  • Remove one or more selectors by clicking on the trash can icon.
  • Arbitrarily exclude a service from the selection by unchecking the checkbox in the first column in the list of services. It is not possible to exclude hierarchies from the selection.

The URL of the generated service for each hierarchy and measure is displayed in the "URL" column of the table in the "TDX" view.

Example 2. 

Example output when exporting Sku label data of the Product dimension:

$ curl http://localhost:55183/ide-planning-app/tdx/hierarchies/Product_Sku_Label

Product:Sku:id|Product:Sku:label
"sku-5"|"Granny Smith"
"sku-4"|"Pink Grapefruit"
"sku-7"|"Beets"
"sku-6"|"Honeycrisp Apples"
"sku-1"|"Blood Orange"
"sku-3"|"Navel Oranges"
"sku-2"|"Clementines"
"sku-9"|"Radishes"
"sku-8"|"Ginger"

Example output when exporting the measure data of the NetSales_R_TY_PLN measure:

$ curl http://localhost:55183/ide-planning-app/tdx/measures/Sales_R_TY_PLN

Product:Sku:id|Location:Store:id|Calendar:Week:id|Sales_R_TY_PLN
"sku-1"|"store-1"|"20170118"|"1778.61"
"sku-2"|"store-1"|"20170118"|"1158.84"
"sku-4"|"store-1"|"20170118"|"445.51"
"sku-3"|"store-1"|"20170118"|"353.41"
"sku-9"|"store-1"|"20170118"|"382.5"
"sku-6"|"store-1"|"20170118"|"1417.5"
"sku-5"|"store-1"|"20170118"|"1625"
...

2.2. Normalized Hierarchy TDX Services

The TDX Services for importing hierarchies generated by the Modeler IDE are normalized. This means that the Modeler IDE generates separate services for label attributes and sort index data of each level in a dimension (e.g. Store, City, and Country) and their hierarchy level mappings (e.g. Store to City, and City to Country). Please note that TDX services for importing and exporting sort index data will only be generated for levels that have the "Order By" setting set to "Custom".

Example 3. 

Let's say we have defined a dimension Location with a default hierarchy that contains three levels: Store (with custom ordering), City, and Country. For this dimension, the Modeler IDE will generate the following TDX services:

  • Location_Store_Index - Import/export custom sort index data for the level members of Store.
  • Location_Store_Label - Import/export label attribute data for the level members of Store.
  • Location_City_Label - Import/export label attribute data for the level members of City.
  • Location_Country_Label - Import/export label attribute data for the level members of Store.
  • Location_Store_City - Import/export level mapping data for level members of Store to level members of City.
  • Location_City_Country - Import/export level mapping data for level members of City to level members of Country.

Deriving Sort Index Data Using LogiQL

Instead of using a generated TDX service such as Location_Store_Index (as seen in the example above) to populate a custom sort index, it's also possible to derive this data using LogiQL.

For instance, the following LogiQL rules (IDB) derive sort index data based on the id attribute of the levels Sku and Store:

block(`sort) {

	clauses(`{
	
		Product:Sku_index[sku] = sort <-
			Product:Sku:id[sku] = sortattr,
			sort = string:int:convert[string:substring[sortattr,4,10]].
	
		Location:Store_index[store] = sort <-
			Location:Store:id[store] = sortattr,
			sort = string:int:convert[string:substring[sortattr,6,10]].
	
	})
	
} <-- .									

This logic can be added under the src/logiql directory of the Modeler IDE project.

Make sure to exclude the import of index data for these levels in the "Import Hierarchies" step of your workflows when using logic to populate sort index data.

3. Workflows

The "Workflows" view of the Modeler IDE allows you to manage the workflows for your Modeler application with a summary of their settings. This view contains a table that gives you an overview of all configured workflows:

The following user actions are supported in this view:

  • Manage the configuration of an existing workflow by clicking on its row in the table.
  • Add a new workflow to your Modeler application by selecting the "+ New" option.
  • Remove an existing action by clicking on the trash can icon.

Use Cases

Workflows are used to execute batch procedures such as initial (bootstrap) deployment and daily batches. These workflows are generated by the Modeler IDE based on the configuration in the "Workflows" view. The workflow generation functionality of the Modeler IDE hides details related to LogicBlox's lb-workflow language and toolset and the Global Batch Manager application which is used under the hood to implement and execute these workflows.

The following workflow steps are supported by the Modeler IDE:

  • Import user authentication and authorization data into the LogicBlox workspace.
  • Import data for hierarchies and measures configured in the Modeler IDE into the LogicBlox workspace.
  • Run actions configured in the Modeler IDE in the master branch of the LogicBlox workspace.
  • Build workbooks based on one or more workbook templates configured in the Modeler IDE.
  • Run actions configured in the Modeler IDE in workbook branches of the LogicBlox workspace.

Please note that workflow support in the Modeler IDE may not support all the possible use cases required for a production-ready Modeler application. Future enhancements to workflow generation that cover such use cases are expected.

For more details about the use of workflows when building Modeler IDE applications, see the Build section.

3.1. Managing Workflow Configuration

The following example shows how a workflow for an example application is configured in the Modeler IDE.

On the left-hand side of the view, the Modeler IDE shows a list of the configured steps in the workflow. On the right-hand side of the view, the Modeler IDE allows you to manage the configuration of the selected step. In the screenshot above, the user is currently managing the configuration of the first "Import Hierarchies" step.

The following user actions are supported in this view:

  • Manage the configuration of an existing step by clicking on its row in the list.
  • Change the order in which steps will be executed in the workflow engine by dragging and dropping it to another position in the list.
  • Add a new step at the bottom of the list of steps by selecting the "+ New" option.
  • Reveal additional options for an existing step by clicking on the ••• button on its row. This context menu includes the following user actions:
    • Add a new step by copying the selected step (including its configuration) using the "Copy" option.
    • Remove the selected step using the "Delete" option.

Order of execution

Even though the moment of execution for each workflow step type is determined by the Global Batch Manager, ordering multiple steps of the same type (e.g. "Run Workbook Actions") in the Modeler IDE will determine in which order these steps of the same type will be executed. The ordering of workflow steps is only relevant for steps of type "Import Hierarchies", "Import Measures", "Run Master Actions", and "Run Workbook Actions".

3.2. Workflow Settings

When managing the settings of a workflow, the "Workflows" view allows you to configure the following settings:

SettingDescription
NameThe name of the workflow.
Data Folder The path, relative to the root of the Modeler IDE project, that contains all the data files that should be imported into the workspace of your Modeler application. The default for this setting is the data/ directory. For more details about the configuration of data files, see the section about Workflow Configuration.

3.3. Import Hierarchies Settings

The following example shows how a workflow step "Import Hierarchies" for an example application is configured in the Modeler IDE.

This type of workflow step can be added multiple times to a workflow. The order of workflow steps of type "Import Hierarchies" in the list of configured workflow steps determines the order of execution between each configured step of type "Import Hierarchies".

The following settings related to the import of hierarchies are visible when the selected step is of type "Import Hierarchies":

SettingDescription
Label Specify the unique label of the workflow step. This label will be displayed in the list of the configured steps in the workflow to make it easier to identify workflow steps of the type "Import Hierarchies".

The view contains a table which allows you to specify which hierarchies should be imported by this workflow step. The Modeler IDE will try to import hierarchy data with all the TDX services in the table unless they have been marked to be excluded from the selection.

The following user actions are supported in this view:

  • Arbitrarily mark a hierarchy to be excluded by checking the checkbox in the "Exclude" column in the list of hierarchies.

Configuration of hierarchy data

This workflow step requires the configuration of data files that contain the level and level mapping data for the hierarchies of your Modeler IDE project. For more details about the configuration of these data files, see the section about Workflow Configuration.

3.4. Import Measures Settings

The following example shows how a workflow step "Import Measures" for an example application is configured in the Modeler IDE.

This type of workflow step can be added multiple times to a workflow. The order of workflow steps of type "Import Measures" in the list of configured workflow steps determines the order of execution between each configured step of type "Import Measures".

The following settings related to the import of measures are visible when the selected step is of type "Import Measures":

SettingDescription
Label Specify the unique label of the workflow step. This label will be displayed in the list of the configured steps in the workflow to make it easier to identify workflow steps of the type "Import Measures".

The view contains a table which allows you to specify which measures should be imported by this workflow step. The Modeler IDE will try to import all measures in the "Summary" table unless they have been marked to be excluded from the selection.

The following user actions are supported in this view:

  • Add one or more selectors using the "+ Add Selector" button. The Modeler IDE supports the following selectors for measure selection:
    • Select by measure component item(s)
    • Select by measure name(s)
    • Select by presence of rules and/or inverses
  • Remove one or more selectors by clicking on the trash can icon.
  • Arbitrarily mark a measure to be excluded by checking the checkbox in the "Exclude" column in the list of measures.

Configuration of TDX services for measure import

Please note that the Modeler IDE requires the configuration of a TDX service for every measure that has been selected to be imported in the "Import Measures" workflow step. The Modeler IDE will display a warning next to the measure name of measures that are not included in the TDX service configuration.

Configuration of measure data

This workflow step requires the configuration of data files that contain the measure data for your Modeler IDE project. For more details about the configuration of these data files, see the section about Workflow Configuration.

3.5. Run Master Actions Settings

The following example shows how a workflow step "Run Master Actions" for an example application is configured in the Modeler IDE.

This type of workflow step can be added multiple times to a workflow. The order of workflow steps of type "Run Master Actions" in the list of configured workflow steps determines the order of execution between each configured step of type "Run Master Actions".

The following user actions are supported in this view:

  • Add a new action to this workflow step by dragging the action field from the list of available actions to the list of selected actions. It's also possible to click on the + icon.
  • Change the order of execution for the selected actions in this workflow step by dragging and dropping actions to another position in the list of selected actions.
  • Remove an action from the list of selected actions by clicking on the X icon.

3.6. Create Workbooks Settings

The following example shows how the workflow step "Create Workbooks" for an example application is configured in the Modeler IDE.

This type of workflow step can be added only once to a workflow.

Configuration of tags

This workflow step requires configuration of workbook template instantiation tags in Modeler IDE project. These tags can be configured in the "Tags" view of the Modeler IDE. For more information about this view, see Tags.

3.7. Run Workbook Actions Settings

The following example shows how a workflow step "Run Workbook Actions" for an example application is configured in the Modeler IDE.

This type of workflow step can be added multiple times to a workflow. The order of workflow steps of type "Run Workbook Actions" in the list of configured workflow steps determines the order of execution between each configured step of type "Run Workbook Actions".

The following settings related to the import of measures are visible when the selected step is of type "Import Measures":

SettingDescription
Workbook Template The actions configured in this workflow step will only be executed in workbooks created using the selected Workbook Template.

The following user actions are supported in this view:

  • Add a new action to this workflow step by dragging the action field from the list of available actions to the list of selected actions. It's also possible to click on the + icon.
  • Change the order of execution for the selected actions in this workflow step by dragging and dropping actions to another position in the list of selected actions.
  • Remove an action from the list of selected actions by clicking on the X icon.

3.8. Import Users Settings

The following example shows how the workflow step "Import Users" for an example application is configured in the Modeler IDE.

This type of workflow step can be added only once to a workflow.

Configuration of user data

This workflow step requires the configuration of data files that contain the user credentials and authorizations for your Modeler IDE project. For more details about the configuration of these data files, see the section about Workflow Configuration.

Part V. Views

1. Dimensions Groups

The "Dimensions Groups" view of the Modeler IDE allows you to manage reusable dimensions groups configurations for your Modeler application.

Use Cases

These configurations can be used to restrict the list of available dimensions and levels in the configuration panel of sheet views, and can be applied at the following levels:

  • Sheet Configuration, the displayable dimensions configuration can be applied to the sheet view.
  • Workbook Template Configuration, the displayable dimensions configuration can be applied to all views within workbooks created using the workbook template.

Additionally, dimensions groups configurations are used to restrict level creation and editing in Workbook Templates.

The view contains a table that gives you an overview of all dimensions groups configurations with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing dimensions groups configuration by clicking on its row in the table.
  • Add a new dimensions groups configuration to your Modeler application by selecting the "+ New" option.
  • Remove an existing dimensions groups configuration by clicking on the trash can icon.
  • Add a new dimensions groups configuration by copying an existing dimensions groups configuration by clicking on the copy icon in its row in the table.

1.1. Managing Dimensions Groups Configuration

The following example shows how a dimensions groups configuration of an example application is configured in the Modeler IDE.

The Modeler IDE shows a list of all dimensions and their levels which can either be included or excluded by the dimensions groups configuration.

The following user actions are supported in this view:

  • Expand or collapse the list of levels in a dimension by using the "-" or "+" icon in front of the dimension name.
  • Restrict the number of visible dimensions and levels in the list by searching for specific dimensions and/or levels using the "Search" box.
  • Add a dimension or level to the dimensions groups configuration by selecting it in the list of dimensions and levels. When you add a dimension to the configuration, all levels of that dimension are implicitly added to the configuration.
  • Remove a dimension or level from the dimensions groups configuration by deselecting it in the list of dimensions and levels.

1.2. Dimensions Groups Settings

When managing a dimensions groups configuration, the "Displayable Dimensions" view allows you to configure the following settings:

SettingDescription
NameThe name of the dimensions groups configuration.
IncludeSetting that indicates whether the Modeler IDE should either include or exclude the selected dimensions and/or levels in this dimensions groups configuration.

2. Displayable Measures

The "Displayable Measures" view of the Modeler IDE allows you to manage reusable displayable measures configurations for your Modeler application. These configurations can be used to restrict the list of available measures in the configuration panel of sheet views, and can be applied at the following levels:

The view contains a table that gives you an overview of all displayable measures configurations with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing displayable measures configuration by clicking on its row in the table.
  • Add a new displayable measures configuration to your Modeler application by selecting the "+ New" option.
  • Remove an existing displayable measures configuration by clicking on the trash can icon.
  • Add a new displayable measures configuration by copying an existing displayable measures configuration by clicking on the copy icon in its row in the table.

2.1. Managing Displayable Measures Configuration

The following example shows how a displayable measures configuration of an example application is configured in the Modeler IDE.

The Modeler IDE shows a list of measures based on the selectors specified by the user. The measures in this list are included in the displayable measures configuration unless they have been marked to be excluded from the selection.

The following user actions are supported in this view:

  • Add one or more selectors using the "+ Add Selector" button. The Modeler IDE supports the following selectors for measure selection:
    • Select by measure component item(s)
    • Select by measure name(s)
    • Select by presence of rules and/or inverses
  • Remove one or more selectors by clicking on the trash can icon.
  • Arbitrarily exclude a measure from the selection by unchecking the checkbox in the first column in the list of measures.

Including/Excluding Indexing And Mapping Measures

The Modeler IDE supports the inclusion or exclusion of indexing measures (e.g. SkuIndex) and mapping measures (e.g. Product:Sku:Subclass) in a Displayable Measures configuration. These measures are generated by the Modeler IDE based on the hierarchy and level configurations in the "Dimensions" view of the Modeler IDE.

2.2. Displayable Measures Settings

When managing a displayable measures configuration, the "Displayable Measures" view allows you to configure the following settings:

SettingDescription
NameThe name of the displayable measures configuration.
Limit to SelectedSetting that indicates whether the Modeler IDE should include the selected measures in this displayable measures configuration.
Exclude SelectedSetting that indicates whether the Modeler IDE should exclude the selected measures in this displayable measures configuration.

3. Sheets

The "Sheets" view of the Modeler IDE allows you to manage the sheet views of your Modeler application. Sheet views are used for data visualization and data editing in your Modeler application.

The configuration of a sheet in the Modeler IDE specifies the default state of a sheet. Modeler applications allow users to change the configuration and layout of views. All configuration and layout preferences are stored per user, which means your changes are not visible to other users within the application. The "Reset State" option within the toolbar of a sheet view will discard all configuration changes made by the user in the view.

The view contains a table that gives you an overview of all configured sheets with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing sheet by clicking on its row in the table.
  • Add a new sheet to your Modeler application by selecting the "+ New" option.
  • Remove an existing sheet by clicking on the trash can icon.
  • Add a new sheet by copying an existing sheet (including its field configuration) by clicking on the copy icon in its row in the table.

3.1. Managing Sheet Configuration

The following example shows how a sheet view of an example application is configured in the Modeler IDE.

3.2. General Settings

When managing the settings of a sheet view, the "General" tab of the "Sheets" view contains the following settings:

SettingDescription
NameThe unique name of the sheet view.
Label The label of the sheet view. This label will be displayed in the header of the sheet in your Modeler application.
View Mode Specify the mode of the sheet view. The view mode determines how data is being displayed in a view. You can select one of the following modes:
  • Grid Mode. The default mode of a sheet which displays the data in a pivot grid.
  • Chart Mode. In this mode, Modeler displays the data in a chart.
  • JSON Mode. When JSON Mode has been enabled, the user can inspect and change the view configuration of the sheet using its JSON syntax. This mode can be useful while developing views for a Modeler application.
Displayable Measures Specify the Displayable Measures configuration that should be applied to restrict the list of available measures in the configuration panel of this sheet views.
Displayable Dimensions Specify the Dimensions Groups configuration that should be applied to restrict the list of available dimensions and levels in the configuration panel of this sheet view.
Labels Format Specify the label formatting for levels, level members as well as measures. Display either the label (which is the default behavior), ID, or a combination of them. Displaying the IDs can be useful while developing your Modeler application.
On Enter Press, Move Selection Specify which direction the selection should move when the user presses the Enter key in Grid Mode. By default, Modeler moves the cell selection downwards.
On Tab Press, Move Selection Specify which direction the selection should move when the user presses the Tab key in Grid Mode. By default, Modeler moves the cell selection to the right.
Placeholder Width (px) Specify the width of empty headers (commonly known as placeholders) on the grid. An empty header is displayed when there are no fields configured on the Rows and/or Columns axis. The default for this setting is 100px.
Placeholder Height (px) Specify the height of empty headers on the grid. The default for this setting is 40px.

The following settings related to charting and can be found under "Chart Configuration" when the setting "View Mode" has been set to "Chart".

SettingDescription
Chart Type This option specifies the type of the chart (Bar, Line, or Pie).
Sizing This option specifies the default sizing of the chart in the sheet. Modeler supports the following chart sizing settings:
  • Default - the size of the chart is calculated based on the configuration and amount of data.
  • Fit Width - Modeler will try to fit the chart(s) into the available horizontal space.
  • Fit Height - Modeler will try to fit the chart(s) into the available vertical space.
  • Fit Screen - the previous two settings combined.
Title The title displayed above the chart.
Subtitle The subtitle displayed above the chart.
Show Labels This option specifies whether value labels should be displayed in the charting area.
Show Tooltips This option specifies whether value tooltips should be displayed in the charting area when hovering over data points.
Show Legend This option specifies whether the chart legend (if applicable for this chart) should be displayed.

The following settings related to the sheet toolbar and the axis configuration panels can be found under "Panels".

SettingDescription
Show Measures This option specifies whether this sheet should display the "Measures" axis configuration panel by default.
Show Slices This option specifies whether this sheet should display the "Slices" axis configuration panel by default.
Show Columns This option specifies whether this sheet should display the "Columns" axis configuration panel by default.
Show Rows This option specifies whether this sheet should display the "Rows" axis configuration panel by default.
Show Sheet Header Each sheet view has a header that contains the sheet title and gives the user access to various options. This setting specifies whether this sheet should display the sheet header by default or whether it should be minimized. The sheet header gives the user access to various panels and options. The headers contains the following options:
  • The "View Mode" menu which can be used to toggle the mode of the sheet view. This option always displays the currently selected View Mode.
  • The "Chart" button which opens the Charts Panel for the sheet. This option is only displayed when the View Mode has been set "Chart".
  • The "Chart Sizing" menu which can be used to select the sizing of charts in the view. This option is only displayed when the View Mode has been set "Chart".
  • The magnifying glass icon which can be used to invoke Header Search. This option is only displayed when the View Mode has been set "Grid".
  • The "Filter" menu which can be used to open the Filters Panel or clear all filters for the sheet.
  • The A button which opens the Conditional Formatting Panel for the sheet. This option is only displayed when the View Mode has been set "Grid".
  • The "Export" menu which can be used to export data to CSV or Excel. This option is only displayed when the View Mode has been set "Grid".
  • The remove icon which enables Delete Mode. This option allows you to quickly delete one ore more fields from your axis configuration panels (Measures, Columns, Rows, and Slices).
  • The cogwheel icon which contains the following options:
    • Reset State. This option allows you to discard the configuration changes you made in the sheet.
    • Pivot Settings. Use this option to configure display and tab behavior of the sheet.
    • Deferred Calc. Use this global option if you want to edit multiple cells at a time, and commit all changes together. This option is only displayed when the View Mode has been set "Grid".

Add a new mask filter to the sheet view by selecting the "+ Add Mask Filter" option. Mask Filters can be used to restrict the positions shown on a view (e.g. only display the data of a certain year). Each configured mask filter has the following settings:

Mask Filter SettingDescription
Mask Filter Select the mask filter expression that defines positions that are eligible for being displayed in the sheet view. For more information about the configuration of mask filter expressions in the Modeler IDE, see Mask Filter Expressions.

Remove a mask filter by clicking on the trash can icon.

3.3. Managing Fields Configuration

The "Fields Configuration" tab of the "Sheets" view allows you to configure the levels and measures that should appear on the sheet view.

On the left-hand side of the view, the Modeler IDE shows a browser that contains all the measures and levels that can be used in the configuration of the sheet view. A scroll bar helps navigate through the list of measures and the list of available dimensions and their levels when the content of these lists do not fit within the visible space of the browser.

The "Dimensions" browser displays the dimensional structure of the levels, in a collapsable tree format. The top levels of the tree are dimensions, where each dimension's node can be expanded to show its levels. The browser contains a special level Measures which is used to display the data of measures configured on the Measures panel. To display this data in the sheet, the Measures level needs to be present on the Columns, Rows, or Slices panel. Additionally, the special level "Measure Values" is used in Chart Mode to control whether measure values should be charted along the X or Y axis.

On the right-hand side of the view, the Modeler IDE shows a column for each axis configuration panel: Measures, Columns, Rows, and Slices. When the "View Mode" setting for this sheet has been set to "Chart", the Modeler IDE also displays an axis configuration panel for Color.

The following user actions are supported in this view:

  • Expand or collapse the list of levels for a dimension in the dimension browser by using the "-" or "+" icon in front of the dimension name.
  • Restrict the number of visible measures and levels in the browser by searching for specific measures and/or levels using the "Search" box.
  • Drag one or more measures onto the Measures panel. The data of these measures will be displayed on the sheet based. To control the order in which measures appear in the column (or row) headers, you can re-arrange the order in which measures appear in the Measures Panel. One single measure can be added multiple times on the Measures panel.
  • Drag one or more levels onto the Columns panel. Each position of that level gets its own column, and becomes a "Column Header".
  • Drag one or more levels onto the Rows panel. Each position of that level gets its own row, and becomes a "Row Header".
  • Drag one or more levels onto the Slices panel. This is a fast way to create a single-select drop-down filter on the positions of that level. The selection is used to filter the data that is being displayed in the data visualization area. Besides levels, you can also drag the special Measures level onto the Slices panel. In this case, the selected measure becomes the only one whose data is shown.
  • Drag one or more measures onto the Columns or Rows panel, which makes these measures become Attributes. One single measure can be added multiple times on the Columns and Rows panels.
  • Manage the settings of measure and level fields that have been dragged onto the axis configuration panels by clicking on the cogwheel icon next to the measure or level name.
  • Remove a measure or level field from an axis by dragging and dropping the level field out of the axis configuration panel.

Configuring Indexing And Mapping Measures

The Modeler IDE allows you to add indexing measures (e.g. SkuIndex) and mapping measures (e.g. Product:Sku:Subclass) to the axis configuration panels in the Fields Configuration. These measures are generated by the Modeler IDE based on the hierarchy and level configurations in the "Dimensions" view of the Modeler IDE.

3.3.1. Managing Level Settings (Columns, Rows)

The following example shows the panel that appears on the right-hand side of the "Sheets" view when managing the settings of a level that has been placed on the Columns or Rows panel.

This side panel contains the following settings:

SettingDescription
Header Width (px) Specify the width of row and column headers on the grid for this level. The default for this setting is 100px.
Header Height (px) Specify the height of row and column headers on the grid for this level. The default for this setting is 40px.
Display as Outline? Specify whether Modeler should display this aggregated level in outline mode. Outline mode creates a new column or row for the level members of this level. Hiding the outline provides more screen real estate, especially when "Display Rollup?" has been enabled for the level. This option is only visible for aggregated levels and when there is a lower level of the same dimension is present on the same axis configuration panel.
Display Rollup? Specify whether Modeler should display this aggregated level in rollup mode. Rollup mode creates an additional column or row for rollup values. This option is only visible for aggregated levels and when there is a lower level of the same dimension is present on the same axis configuration panel.
Sort Specify whether positions of this level should be sorted in ascending or descending order. This option is not visible for the special "Measures" level.
Sort By Specify whether the level should be sorted by ID or Label. This option is not visible for the special "Measures" level.
Filter Specify what filter should be applied to the positions of this level. Available filter types are "Match" and "Selection". By default, levels are not filtered. This option is not visible for the special "Measures" level.
Match Specify how the filter should compare the ID or label of the level with the specified value. This option is only visible when the filter is of type "Match".
Value Specify the constant value that should be used by the filter's comparison. This option is only visible when the filter is of type "Match".

When the filter type is set to "Selection", it's possible to add the ID of levels which should be included in the filter using the "+ Add Selection" option. Each configured selection has the following settings:

Selection SettingDescription
Selection The ID of the level to include in the selection of the filter.

Remove a selection configuration by clicking on the trash can icon.

3.3.2. Managing Level Settings (Slices)

The following example shows the panel that appears on the right-hand side of the "Sheets" view when managing the settings of a level that has been placed on the Slices panel.

This side panel contains the following settings:

SettingDescription
Sort Specify whether positions of this level should be sorted in ascending or descending order. By default, positions are not sorted. This option is not visible for the special "Measures" level.
Initial Value Specify an initial value for the slice selection.
Slice Sync Select one or more sheets with the same level on the Slices panel. The slice selection will automatically be synchronized between the selected sheets per individual user.
Use a measure for an initial value? Specify the measure that contains the initial value for the slice selection. This option is only available when one or more sheets have been selected in the "Slice Sync" setting. This option is not visible for the special "Measures" level.

3.3.3. Managing Measure Settings (Measures, Columns, Rows)

The following example shows the panel that appears on the right-hand side of the "Sheets" view when managing the settings of a measure that has been placed on an axis configuration panel.

3.3.3.1. General Settings

When managing the settings of a measure on an axis configuration panel, the "General" tab of the side panel contains the following settings:

SettingDescription
Header Width (px) Specify the width of row and column headers on the grid for this measure. The default for this setting is 100px.
Header Height (px) Specify the height of row and column headers on the grid for this measure. The default for this setting is 40px.
Hide Field Specify whether this measure should be visible on the view. By default, measures are shown on the view.
Sort By Measure Value Specify whether data of this measure should be sorted in ascending or descending order. By default, measure values are not sorted.
Filter Specify what filter should be applied to the measure data. By default, measure values are not filtered.
Min Specify the minimum value for a measure to be included in the filter. This option is only visible when the filter is of type "At Least" or "Range".
Max Specify the maximum value for a measure to be included in the filter. This option is only visible when the filter is of type "At Most" or "Range".
Value Specify the exact value that should be used by the filter's comparison. This option is only visible when the filter is of type "Exact".
Exclude from results Specify whether measures values that match the filter should be excluded instead of being included in the results. This option is only visible when the filter is of type "Exact".
Inclusive Specify whether the filter should include measure values that are exactly the "Min" and "Max" values. By default, this setting is disabled.
Include empty Specify whether the filter should include empty values (positions without data) of a measure. By default, this setting is disabled.
Dropdown Filter Specify the dropdown filter expression that should be applied to the measure data. This option is only visible in case of an entity-typed measure. For more information about the configuration of dropdown filter expressions, see Dropdown Filter Expressions.

3.3.3.2. Conditional Formatting

When managing the settings of a measure on an axis configuration panel, the "Conditional Formatting" tab of the side panel allows the user to add conditional formatting configurations for the measure by selecting the "+ Add Conditional Formatting" option. Conditional formatting rules are based on comparisons with constants and are used by your Modeler application to format the cells containing data for this measure in Grid Mode.

Each configured conditional formatting has the following settings:

Conditional Formatting SettingDescription
Format based on measure Specify the measure of which the value should be used in the comparison of this conditional formatting rule.
Condition Specify the condition that should be used in the comparison of this conditional formatting rule.
Value Specify the constant value that should be used in the comparison. This option is only visible when the "Condition" is set to a comparison operator (>, >=, <, <=, =, or <>)
From Specify the constant from-value that should be used in the range-comparison. This option is only visible when the "Condition" is set to "is in range".
To Specify the constant to-value that should be used in the range-comparison. This option is only visible when the "Condition" is set to "is in range".
Format Configuration Formatting configuration options include the background color, foreground color, and font styles such as bold, italic, and strike-through.
Format Preview This area is used by the Modeler IDE to display a preview of the format configuration.

Remove a conditional formatting configuration by clicking on the trash can icon.

4. Canvases

The "Canvases" view of the Modeler IDE allows you to manage the canvas views for your Modeler application. Canvas views are used to layout sheet views and action panels in your Modeler application.

The view contains a table that gives you an overview of all configured canvases with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing canvas by clicking on its row in the table.
  • Add a new canvas to your Modeler application by selecting the "+ New" option.
  • Remove an existing canvas by clicking on the trash can icon.
  • Add a new canvas by copying an existing canvas by clicking on the copy icon in its row in the table.

4.1. Managing Canvas Configuration

The following example shows how a canvas view of an example application is configured in the Modeler IDE. This canvas contains two sheet views.

Tile-Based Layout System

The placement and sizing of views within the canvas of a Modeler application are controlled by a tile-based layout system. The default layout of a canvas is configured within the Modeler IDE.

Modeler allows users to reorganize panes (e.g. sheets and action panels) within a canvas by dragging them to the preferred position within the view. Panes can be removed from a view by dragging them out of the canvas. Modeler will ask the user for confirmation before actually removing the view to make sure the removal is intentional.

Users can reset the canvas layout of any view to its default configuration using the "Default Layout" option under the ••• button next to the name of the canvas view in the navigation tree. When you reset the canvas layout, any removed panes are restored.

The "Canvases" view allows you to configure the following settings:

SettingDescription
Name Specify the unique name of the canvas view.
Label Specify the label of the canvas view. This label will be displayed in the navigation of your Modeler application.
Sheets Specify the number of sheet views you want to include in this canvas view. The Modeler IDE supports the configuration of either one or two sheet views per canvas.
Sheet 1Specify the first sheet view that needs to be included in this canvas.
Width The width of the first sheet specified in pixels (e.g. 200px), percentage (e.g. 40%), or ratio (e.g. 1). The default for this setting is 50% for horizontal positioning. This setting is fixed to 100% in the case of vertical positioning.
Height The height of the first sheet specified in pixels (e.g. 200px), percentage (e.g. 40%), or ratio (e.g. 1). The default for this setting is 59% for vertical positioning. This setting is fixed to 100% in the case of horizontal positioning.
Sheet 2 Specify the second sheet view that needs to be included in this canvas. This option is only visible when the "Sheets" setting has been set to "Two Sheets"
Width The width of the second sheet specified in pixels (e.g. 200px), percentage (e.g. 40%), or ratio (e.g. 1). The default for this setting is 50% for horizontal positioning. This setting is fixed to 100% in the case of vertical positioning. This option is only visible when the "Sheets" setting has been set to "Two Sheets"
Height The height of the second sheet specified in pixels (e.g. 200px), percentage (e.g. 40%), or ratio (e.g. 1). The default for this setting is 59% for vertical positioning. This setting is fixed to 100% in the case of horizontal positioning. This option is only visible when the "Sheets" setting has been set to "Two Sheets"
Sheets Layout Specify whether the sheets should be tiled horizontally (left and right) or vertically (top and bottom). This option is only visible when the "Sheets" setting has been set to "Two Sheets"
Action Panel When this setting has been enabled, it's possible to configure one or more action panels that should be included in this canvas.

4.2. Configuring Action Panels

The following example shows a canvas configuration that contains one sheet view and an action panel. The view contains a table that gives you an overview of all configured action panels with a summary of their settings:

The following user actions related to the configuration of action panels are supported in this view:

  • Manage the configuration of an existing action panel by clicking on its row in the table.
  • Add a new action panel to your Modeler application by selecting the "+ New" option.
  • Remove an existing action panel by clicking on the trash can icon.

4.2.1. Managing Action Panel Configuration

The Modeler IDE shows a sidebar when configuring an action panel.

The following user actions are supported in this sidebar:

  • Restrict the number of visible actions in the list of available actions by searching for specific actions using the "Search" box.
  • Add a new action to the action panel by dragging the action field from the list of available actions to the list of selected actions. It's also possible to click on the + icon.
  • Change the position of an action in the action panel by dragging and dropping it to another position in the list of selected actions.
  • Remove an action from the list of selected actions by clicking on the X icon.

4.2.2. Action Panel Settings

When managing the configuration of an action panel, the "Canvases" view allows you to configure the following settings:

SettingDescription
Position The position of the action panel on the canvas (top, right, bottom, or left).
Width The width of the action panel specified in pixels (e.g. 40px), percentage (e.g. 40%), or ratio (e.g. 1). The default for this setting is 140 pixels for left and right positioning. This setting is fixed to 100% in the case of top and bottom positioning.
Height The height of the action panel specified in pixels (e.g. 40px), percentage (e.g. 40%), or ratio (e.g. 1). The default for this setting is 40 pixels for top and bottom positioning. This setting is fixed to 100% in the case of left and right positioning.

Part VI. Workbooks

1. Workbook Templates

The "Workbook Templates" view of the Modeler IDE allows you to manage the workbook templates of your Modeler application. Workbook templates are used to configure the partitioning of a workbook and can be instantiated whenever you need a workbook with the partitioning as configured in the template.

The view contains a table that gives you an overview of all configured templates with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing workbook template by clicking on its row in the table.
  • Add a new workbook template to your Modeler application by selecting the "+ New" option.
  • Remove an existing workbook template by clicking on the trash can icon.

Note

In this manual, we assume that you already are familiar with the workbooks framework and the branching capabilities of the LogicBlox database. An overview of the basic concepts of the workbooks framework can be found in the LogicBlox Core Reference Manual.

1.1. Managing Workbook Template Configuration

The following example shows how a workbook template of an example application is configured in the Modeler IDE.

1.2. General Settings

When managing the settings of a workbook template, the "General" tab of the "Workbook Templates" view contains the following settings:

SettingDescription
NameThe name of the workbook template.
LabelThe label of the workbook template.
Navigation Select the navigation tree of the Modeler application that should be used for all workbooks created using this workbook template. Navigations can be configured in the "Navigations" view of the Modeler IDE.
Workbook Project FileThe LogiQL project file which contains the configuration of the LogiQL library for the workbook template.
Displayable Measures Specify the Displayable Measures configuration that should be applied to restrict the list of available measures in the configuration panel of all available views of the workbooks created using this workbook template.
Displayable Dimensions Specify the Dimensions Groups configuration that should be applied to restrict the list of available dimensions and levels in the configuration panel of all available views of the workbooks created using this workbook template.
Level Creation Policy Specify the Dimensions Groups configuration that should be applied to restrict the levels that can be created in all available views of the workbooks created using this workbook template. Level creation functionality includes the creation of new level members. The default for this setting is based on the "Enable Levels Creation" setting found in the Modeling Features tab of the "Settings" view.
Level Editing Policy Specify the Dimensions Groups configuration that should be applied to restrict the levels that can be edited in all available views of the workbooks created using this workbook template. Level editing functionality includes the renaming of existing level members and modifying level mappings. The default for this setting is based on the "Enable Levels Editing" setting found in the Modeling Features tab of the "Settings" view.

Add a new position to the workbook template to specify the levels at which workbooks should be partitioned by selecting the "+ Add Position" option. Each configured position has the following settings:

Position SettingDescription
Dimension Dimension of the level at which we partition
Hierarchy Hierarchy of the level at which we partition
Level Specify the level at which we partition
Unfiltered Hierarchies Optionally specify a list of unfiltered hierarchies. These unfiltered hierarchies will be fully included in the workbook.

Remove a position configuration by clicking on the trash can icon.

Default Commit and Refresh Groups

By default, each workbook of the Modeler application is created using the CLONE method and is provided with a commit and refresh group named default which commits all measures without measures rules (i.e. EDB and NOT_DERIVED measures) and all dimensions of the model. The default refresh group is used for the initial refresh of data when creating a new workbook. These commit groups are not visible in the "Workbook Templates" view of the Modeler IDE.

The Modeler IDE allows you to configure one or more custom commit and refresh groups that can be associated with commit and refresh actions (typically configured as Header Actions). Please note that these custom commit and refresh groups are always considered to be a subset of these default groups. This means that the inclusion of levels or measures that are not part of the default commit and refresh group (i.e. IDB measures) will have no effect when committing or refreshing the workbook.

1.3. Managing Commit Group Configuration

The "Commit Groups" tab of the "Workbook Templates" view contains a table that gives you an overview of all configured commit groups with a summary of their settings:

The following user actions are supported in this view:

  • Manage the settings of an existing commit group by clicking on its row in the table.
  • Add a new commit group to the workbook template by selecting the "+ New" option.
  • Remove an existing commit group by clicking on the trash can icon.

1.3.1. Commit Group Settings

Each configured commit group has the following settings:

SettingDescription
Name Name of the commit group.
Include All Levels? This setting specifies whether the commit group will include all levels or only a selection of levels. When this option is set to "No", it's possible to specify the levels and their level policies that should be included using the "+ Add Level" and "+ Add Level Policy" option. Please note that a level will only be included in the commit group when both a "Level" and "Level Policy" have been configured.
Include All Levels Maps? This setting specifies whether the commit group will be configured with a list of level maps that should either be included or excluded when committing the workbook.
Excluded Levels Maps Selection of the level maps that should be excluded. This option is only visible when the "Include All Levels Maps?" setting is set to "Yes".
Included Levels Maps Selection of the level maps that should be included. This option is only visible when the "Include All Levels Maps?" setting is set to "No".

The following user actions are supported in this dialog:

  • Return to the list of commit groups by selecting the "Back" option.

1.3.2. Including Specific Levels

When the "Include All Levels?" is set to "No", it's possible to add levels which should be included using the "+ Add Level" option. Each configured level has the following settings:

Level SettingDescription
Dimension Dimension of the level to include
Hierarchy Hierarchy of the level to include
Level Specify the level to include
Add New Entity Specify whether new entities should be added in the master when committing the workbook.
Delete Entity Specify whether deleted entities should be deleted in the master when committing the workbook.

Remove a level configuration by clicking on the trash can icon.

1.3.3. Measures Selection

The "Measures Selection" section of the "Workbook Templates" view contains a table which allows the configuration of which measures will be populated in the workbook:

The Modeler IDE shows a list of measures based on the selectors specified by the user. The measures in this list are included in measure selection for this commit group configuration unless they have been marked to be excluded from the selection.

When you don't specify any selectors, the measure selection of this commit group will implicitly include all measures configured in the default commit group. This list of measures will not be shown in the table in the "Measures Selection" section.

The following user actions are supported in this view:

  • Add one or more selectors using the "+ Add Selector" button. The Modeler IDE supports the following selectors for measure selection:
    • Select by measure component item(s)
    • Select by measure name(s)
    • Select by presence of rules and/or inverses
  • Remove one or more selectors by clicking on the trash can icon.
  • Arbitrarily exclude a measure from the measure selection by unchecking the checkbox in the first column in the list of measures.

1.4. Managing Refresh Group Configuration

The "Refresh Groups" tab of the "Workbook Templates" view contains a table that gives you an overview of all configured refresh groups with a summary of their settings:

The following user actions are supported in this view:

  • Manage the settings of an existing refresh group by clicking on its row in the table.
  • Add a new refresh group to the workbook template by selecting the "+ New" option.
  • Remove an existing refresh group by clicking on the trash can icon.

1.4.1. Refresh Group Settings

Each configured refresh group has the following settings:

SettingDescription
Name Name of the refresh group.
Include All Levels? This setting specifies whether the refresh group will include all levels or only a selection of levels. When this option is set to "No", it's possible to specify the levels and their level policies that should be included using the "+ Add Level" and "+ Add Level Policy" option. Please note that a level will only be included in the refresh group when both a "Level" and "Level Policy" have been configured.
Include All Levels Maps? This setting specifies whether the refresh group will be configured with a list of level maps that should either be included or excluded when refreshing the workbook.
Excluded Levels Maps Selection of the level maps that should be excluded. This option is only visible when the "Include All Levels Maps?" setting is set to "Yes".
Included Levels Maps Selection of the level maps that should be included. This option is only visible when the "Include All Levels Maps?" setting is set to "No".
Post Refresh Inactive Block The inactive block of LogiQL which should be executed after refreshing the workbook.

The following user actions are supported in this dialog:

  • Return to the list of refresh groups by selecting the "Back" option.

1.4.2. Including Specific Levels

When the "Include All Levels?" is set to "No", it's possible to add levels which should be included using the "+ Add Level" option. Each configured level has the following settings:

Level SettingDescription
Dimension Dimension of the level to include
Hierarchy Hierarchy of the level to include
Level Specify the level to include
Add New Entity Specify whether new entities in the master should be added when refreshing the workbook.
Delete Entity Specify whether deleted entities in the master should be deleted when refreshing the workbook.

Remove a level configuration by clicking on the trash can icon.

1.4.3. Measures Selection

The "Measures Selection" section of the "Workbook Templates" view for refresh groups works in exactly the same way as for commit groups (see section Measures Selection).

1.5. Header Actions

Add a new action button to the menu bar of your Modeler application by selecting the "+ Add Header Action" option. These action buttons will only be visible only for workbooks using this workbook template. Each configured action button has the following settings:

Header Action SettingDescription
Action ID The ID of the action to call for this action button. These actions can be configured in the "Actions" view of the Modeler IDE.

Remove an existing action button configuration by clicking on the trash can icon.

Use Cases

Header action buttons are typically used for performing a workbook commit or refresh action.

Please note that the Modeler IDE does not support the configuration of header actions buttons for the master workbook or Modeler applications that don't use workbooks at all.

2. Tags

The "Tags" view of the Modeler IDE allows you to manage the tags of your Modeler IDE project. This view contains a table that gives you an overview of all configured tags with a summary of their settings:

The following user actions are supported in this view:

  • Manage the configuration of an existing tag by clicking on its row in the table.
  • Add a new tag to your Modeler IDE project by selecting the "+ New" option.
  • Remove an existing tag by clicking on the trash can icon.

2.1. Managing Tag Configuration

The following example shows how a tag for an example application is configured in the Modeler IDE.

The "Tag" view allows you to configure the following settings:

SettingDescription
Name Specify the unique name for the tag.

Add a new workbook template to the tag by selecting the "+ Add Template" option. A tag can contain multiple workbook template configurations.

SettingDescription
Template Specify the workbook template you want to include in the build when the tag has been selected.

Remove a template configuration by clicking on the trash can icon next to the "Template" setting.

Select the "+ Add Position" option to specify the level members by their id (e.g. "class-1") at which workbooks should be partitioned for each level. Remove a position configuration by clicking on the trash can icon.

The Modeler IDE will build a workbook for each position in the tag configuration. When the tag configuration in the screenshot above has been selected during build, the following workbook list will be presented to the user after logging in to the example Modeler application:

Part VII. Build

1. Global Validation

All views in the Modeler IDE contain standard input validation. These form validations make sure that required fields are filled out by the user and the input is correctly formatted.

Besides form validations, the Modeler IDE is equipped with global validation. Global validation makes sure the configuration of the entire Modeler application is complete and consistent. When the Modeler IDE detects problems in the configuration, it will show a "!" icon in the top menu bar as a notification. This "!" icon has a badge with the number of validation errors. To indicate the presence of validation errors, the menu bar will also turn orange.

Click on the "!" icon in the top menu bar to open the validation console. This sidebar contains a summary of all validation errors. The summary contains links to relevant views to help the user quickly solve the problems in the configuration.

2. Local Development

The Modeler IDE provides you with everything you need to build, run, and test your Modeler application locally.

2.1. Build

The "Build" view contains a "Build" button that is enabled when there are no global validation errors. When you press this button, the Modeler IDE will (re)build the entire Modeler application. When the Modeler IDE does not detect any changes in the project configuration, you can force a rebuild by holding the Shift key when clicking on the "Build" button.

The Modeler IDE supports incremental build for workflows that do not contain a "Create Workbooks" step. This feature improves developer productivity by providing an "Update" button on the "Build" view of the Modeler IDE to quickly update an existing build after making changes to a navigation, canvas, sheets, and/or the measure model. Incremental build prevents the developer from having to wait for a complete build to succeed before being able to test these type of changes.

Use the "Cancel" button to cancel a running build.

The following settings are available in the "Build" view of the Modeler IDE:

SettingDescription
Workflow Select one of the available Workflows that should be executed during the build.
Apply Workbook Template Settings To simulate a build with workbooks, developers can toggle the "Apply Workbook Template Settings" option to build and test the Modeler IDE project without workbooks while using the navigation and project file as configured in the selected workbook template. This option is only visible when the selected workflow does not contain a "Create Workbooks" step.
Tag Name The workbook template instantiation tag that determines which of the available workbook instantiations should be used to create workbooks during the build. Currently, the Modeler IDE does not allow the user to specify more than one tag for a build. This option is only visible when the selected workflow contains a "Create Workbooks" step.
Workbook Template(s) Selection of one or more Workbook Templates that should be instantiated during the build when the selected workflow contains a "Create Workbooks" step. When the "Apply Workbook Template Settings" has been enabled, this setting is used to indicate the workbook template should be used when installing the navigation and project file.
Warmup? When this option is enabled, the Modeler IDE will run view warmups in workbooks. When the option is disabled, the Modeler IDE will run no warmups at all. This option is only visible when the selected workflow contains a "Create Workbooks" step.

View and rule warmups

Currently, the Modeler IDE doesn't run rule warmups in both master and the workbooks during the build. The "Warmup?" setting can be used to disable view warmups in workbooks to speed up the build process during local development. Support for rule warmups might be added in the future.

2.2. Open Modeler Application in Browser

Modeler applications built with the Modeler IDE are web applications and are typically deployed to a web server. For local development, the Modeler IDE allows you to open the application without having to install and run additional software such as a web server.

To open the Modeler application, select the "Open In Browser" option in the top menu bar. This option can be found on the right-hand side of the header of the Modeler IDE. The application will automatically open in your web browser:

After signing in using your credentials, the Modeler application will open:

Tip

As long as the Modeler IDE is running, you can also open the Modeler application by manually typing http://localhost:8000 in the address bar of your web browser.

3. Workflow Configuration

The following steps in Workflows require the configuration of data files in the Modeler IDE project:

  • Import Hierarchies
  • Import Measures
  • Import Users

The following sections contain the requirements for the location, names, and contents of these data files.

3.1. Hierarchy Data

The following example shows how a workflow step "Import Hierarchies" for an example application is configured in the Modeler IDE.

The Modeler IDE uses the following naming convention to locate hierarchy data files in the configured data folder (e.g. data/):

  • <Dimension>_<Level>_Label.csv - Contains label attribute data for the level (e.g. Product:Sku)
  • <Dimension>_<Level>_Index.csv - Contains custom sort index data for the index predicate of the level (e.g. Product:Sku_index)
  • <Dimension>_<Level>_<ParentLevel>.csv - Contains hierarchy mapping data for the level (e.g. Product:Sku to Product:Subclass)

For the selected workflow step in the screenshot above, the Modeler IDE will try to locate and import the following data files for the Sku level of the Product dimension:

Product_Sku_Label.csv
Prodcut_Sku_Subclass.csv

In our example application, the import of custom sort index data in Product_Sku_Index.csv has been excluded in this workflow configuration.

Example 4. 

The file Product_Sku_Label.csv contains a mapping from the id to the label attribute for each Sku level. In the header of the data file, the Modeler IDE expects two columns:

  • <Dimension>:<Level>:id
  • <Dimension>:<Level>:label

The following example shows the contents of Product_Sku_Label.csv in an example application.

Product:Sku:id|Product:Sku:label
sku-1|Blood Orange
sku-2|Clementines
sku-3|Navel Oranges
sku-4|Pink Grapefruit
sku-5|Granny Smith
sku-6|Honeycrisp Apples
sku-7|Beets
sku-8|Ginger
sku-9|Radishes

The file Product_Sku_Index.csv contains a mapping from the id to the custom sort index for each Sku level. In the header of the data file, the Modeler IDE expects two columns:

  • <Dimension>:<Level>:id
  • <Dimension>:<Level>_index

The following example shows the contents of Product_Sku_Index.csv in an example application.

Product:Sku:id|Product:Sku_index
"sku-1"|"1"
"sku-4"|"4"
"sku-3"|"3"
"sku-6"|"6"
"sku-5"|"5"
"sku-2"|"2"
"sku-8"|"8"
"sku-7"|"7"
"sku-9"|"9"

The file Product_Sku_Subclass.csv contains the hierarchy mapping from Product:Sku:id to Product:Subclass:id. In the header of the data file, the Modeler IDE expects two columns:

  • <Dimension>:<Level>:id
  • <Dimension>:<ParentLevel>:id

The following example shows the contents of Product_Sku_Subclass.csv in an example application.

Product:Sku:id|Product:Subclass:id
sku-1|subclass-1
sku-2|subclass-1
sku-3|subclass-1
sku-4|subclass-1
sku-5|subclass-2
sku-6|subclass-2
sku-7|subclass-3
sku-8|subclass-3
sku-9|subclass-3

3.2. Measure Data

The following example shows how a workflow step "Import Measures" for an example application is configured in the Modeler IDE.

The Modeler IDE uses the following naming convention to locate measure data files in the configured data folder (e.g. data/) for concrete measures:

<Measure>.csv

For derived measures, the filename should also contain the measure component items as configured for the measure variant:

<Measure>_<Component1>_<Component2>_<ComponentN>.csv

For the selected workflow step in the screenshot above, the Modeler IDE will try to locate and import the following data files:

Returns_R_TY_PLN.csv
Returns_U_TY_PLN.csv
..

Example 5. 

In the header of the measure data file, the Modeler IDE expects one column for each level in the intersection of the measure to identify the position of the data: <Dimension>:<Level>:id. The measure data itself is expected in an additional column with the same name as the concrete or derived measure (e.g. Returns_R_TY_PLN).

The following example shows the contents of a data file for the Returns_R_TY_PLN measure which is keyed at Sku,Store,Week.

Product:Sku:id|Location:Store:id|Calendar:Week:id|Returns_R_TY_PLN
sku-7|store-1|20170104|0.00
sku-7|store-1|20170111|0.00
sku-7|store-1|20170118|0.00
sku-7|store-1|20170125|220.00
sku-7|store-1|20170201|140.00
sku-7|store-1|20170208|60.00
sku-7|store-1|20170215|20.00
sku-7|store-1|20170222|360.00
..

3.3. User Data

The following example shows how a workflow step "Import Users" for an example application is configured in the Modeler IDE.

The Modeler IDE searches for a data file named users.csv in the configured data folder (e.g. data/). This file contains all user credentials for the Modeler application and is imported using LogicBlox's standard credentials database and services. More information about the credentials database and services, including requirements for the user data file and information about password encryption, can be found in the LogicBlox Administration Guide.

Example 6. 

The following example shows the contents of users.csv file for a user with username logicblox.

USER|EMAIL|DEFAULT_LOCALE|ACTIVE|PASSWORD|PUBLIC_KEY
logicblox|logicblox@infor.com|||$2a$10$25pEtRB2rZMtkG8mC8Eqy.snViyO2dgtQptSmomPbn3Y9OPgwns/S|
..

Additionally, the Modeler IDE searches for a data file named user-roles.csv in the configured data folder. This file contains the user role mappings for the users listed in users.csv and is also imported using LogicBlox's standard credentials database and services. To authorize a user for accessing the Modeler application, you need to assign it the Modeler User role.

Example 7. 

The following example shows the contents of a user-roles.csv file for a user with username logicblox.

USER|ROLE
logicblox|Modeler User
..

Part VIII. CubiQL

1. Measure Rules And Inverses

Business logic in a Modeler application can be configured for Concrete Measures, Measure Components (as overrides), and Measure Variants using measure rules. These measure rules can be configured within the Modeler IDE as CubiQL expressions.

To simplify the configuration of measure rules and inverses, the Modeler IDE contains a CubiQL editor. This editor supports CubiQL syntax highlighting, code completion for measure names, a measure explosion syntax for measure variants, and a set of special variables.

The following sections explain the use of the measure explosion syntax in more detail by discussing common use cases in retail planning applications.

Measure Explosion Syntax ($)

As described in the section on Measure Variants, the Modeler IDE will explode measure variants along their measure components. This means the Modeler IDE will generate derived measures for every combination of the selected measure components for a measure variant.

The Modeler IDE has a measure explosion syntax which can be used in CubiQL expressions that allows you to define how the measures in CubiQL rules and inverses should be exploded along the measure components of a measure variant. To use this syntax, simply add $ in front of the measure name.

Base Intersection Variable ($$BASE)

You can use the variable $$BASE in your measure rules and inverses. This variable holds the base intersection of a measure variant based on the measure components along which a rule is being exploded.

This Variable ($$THIS)

You can use the variable $$THIS in your measure rules and inverses configured as overrides at the measure component level. This variable will be substituted by the measure to which the override is being applied (e.g. Sales). The measure explosion syntax can also be applied on this variable (e.g. $$THIS_R).

1.1. Net Sales

In retail planning applications, the measure NetSales tracks the Sales minus Returns for a particular type of Sku:

NetSales = Sales - Returns

The following example shows the configuration of measure variant <R,U>_<TY,WP,LY>_<PLN,MGR> of the NetSales measure in an example application that keeps track of the net sales in retail dollar amount (R) and units (U) for the versions TY, LY, and WP and roles PLN and MGR.

1.1.1. Measure Rule

You can only configure one rule per measure variant. Since we're exploding the measure NetSales along the UOM (R and U), Version (WP, TY, and LY), and Role (PLN and MGR) component, we'll need to make sure this single rule works for all our derived measures. This means our rule should cover all of the following cases:

NetSales_R_WP_PLN = Sales_R_WP_PLN - Returns_R_WP_PLN
NetSales_R_TY_PLN = Sales_R_TY_PLN - Returns_R_TY_PLN
NetSales_R_LY_PLN = Sales_R_LY_PLN - Returns_R_LY_PLN
NetSales_U_WP_PLN = Sales_U_WP_PLN - Returns_U_WP_PLN
NetSales_U_TY_PLN = Sales_U_TY_PLN - Returns_U_TY_PLN
NetSales_U_LY_PLN = Sales_U_LY_PLN - Returns_U_LY_PLN
NetSales_R_WP_MGR = Sales_R_WP_MGR - Returns_R_WP_MGR
NetSales_R_TY_MGR = Sales_R_TY_MGR - Returns_R_TY_MGR
NetSales_R_LY_MGR = Sales_R_LY_MGR - Returns_R_LY_MGR
NetSales_U_WP_MGR = Sales_U_WP_MGR - Returns_U_WP_MGR
NetSales_U_TY_MGR = Sales_U_TY_MGR - Returns_U_TY_MGR
NetSales_U_LY_MGR = Sales_U_LY_MGR - Returns_U_LY_MGR

The following rule for NetSales uses the measure explosion syntax to explode the measures Sales and Returns along all their measure components.

$Sales - $Returns

Since we're not specifying any measure components in this rule, you could also read this rule as:

Sales_<UOM>_<Version>_<Role> - Returns_<UOM>_<Version>_<Role>

In our case, this will result in the following set of rules being assigned to the derived measures of NetSales:

NetSales_R_WP_PLN = Sales_R_WP_PLN - Returns_R_WP_PLN
NetSales_R_TY_PLN = Sales_R_TY_PLN - Returns_R_TY_PLN
NetSales_R_LY_PLN = Sales_R_LY_PLN - Returns_R_LY_PLN
NetSales_U_WP_PLN = Sales_U_WP_PLN - Returns_U_WP_PLN
NetSales_U_TY_PLN = Sales_U_TY_PLN - Returns_U_TY_PLN
NetSales_U_LY_PLN = Sales_U_LY_PLN - Returns_U_LY_PLN
NetSales_R_WP_MGR = Sales_R_WP_MGR - Returns_R_WP_MGR
NetSales_R_TY_MGR = Sales_R_TY_MGR - Returns_R_TY_MGR
NetSales_R_LY_MGR = Sales_R_LY_MGR - Returns_R_LY_MGR
NetSales_U_WP_MGR = Sales_U_WP_MGR - Returns_U_WP_MGR
NetSales_U_TY_MGR = Sales_U_TY_MGR - Returns_U_TY_MGR
NetSales_U_LY_MGR = Sales_U_LY_MGR - Returns_U_LY_MGR

You can inspect how your measure rules will be exploded by the Modeler IDE by opening the Preview tab of your measure variant.

1.1.2. Inverses

The measure explosion syntax can also be applied to inverse rules to calculate the new value for $Sales and $Returns when you edit the value of $NetSales. The value entered by the user is available as Input. You can use the following CubiQL rule for the inverse group of $Sales:

$Returns + Input

The Modeler IDE explodes this rule to the following set of inverses for Sales:

Sales_R_WP_PLN = Returns_R_WP_PLN + Input
Sales_R_TY_PLN = Returns_R_TY_PLN + Input
Sales_R_LY_PLN = Returns_R_LY_PLN + Input
Sales_U_WP_PLN = Returns_U_WP_PLN + Input
Sales_U_TY_PLN = Returns_U_TY_PLN + Input
Sales_U_LY_PLN = Returns_U_LY_PLN + Input

The following CubiQL rule can be used for the inverse group of $Returns:

$Sales - Input

As you might have expected, this translates to the following set of inverses for Returns:

Returns_R_WP_PLN = Sales_R_WP_PLN - Input
Returns_R_TY_PLN = Sales_R_TY_PLN - Input
Returns_R_LY_PLN = Sales_R_LY_PLN - Input
Returns_U_WP_PLN = Sales_U_WP_PLN - Input
Returns_U_TY_PLN = Sales_U_TY_PLN - Input
Returns_U_LY_PLN = Sales_U_LY_PLN - Input

Inverse Groups

When you take a look at a Modeler application with a NetSales measure configured with inverses as described in this section, you will notice that Modeler updates the value of $Sales when you edit $NetSales.

By default, the measure service will use the inverse rule in the first inverse group. An example of a situation where the second inverse group becomes relevant is when you turn on Modeler's Deferred Calc mode and edit both $Sales and $NetSales at some position. When you press "Calculate", the measure service will recalculate the value of $Returns with the rule in the second inverse group applying the new values of $Sales and $NetSales.

1.2. Average Unit Retail (AUR)

Average Unit Retail (AUR) is a Unit of Measure (UOM) of Sales which tracks the average dollar amount spent for a particular type of Sku. The values or AUR can be calculated by dividing the total sales in dollars (R) by the number of units sold (U):

Sales_AUR = Sales_R / Sales_U

The following example shows the configuration of measure variant AUR_<TY,WP,LY>_<PLN,MGR> of the Sales measure in an example application that keeps track of the UAR for the versions TY, LY, and WP and roles PLN and MGR:

1.2.1. Measure Rule

To write the CubiQL rule for this measure variant correctly, we need a way to tell the Modeler IDE that it should fix the UOM of Sales to R for the first argument of the division and U for the second argument of the division. The measure explosion syntax gives you the ability to control which measure components should be exploded and which ones shouldn't be exploded in the CubiQL rule:

$Sales_R / $Sales_U

You could also read this rule as:

$Sales_R_<Version>_<Role> / $Sales_U_<Version>_<Role>

The complete list of rules for all derived measures after exploding this rule along Version and Role when keeping the UOM fixed using the measure explosion syntax:

Sales_AUR_WP_PLN = Sales_R_WP_PLN / Sales_U_WP_PLN
Sales_AUR_TY_PLN = Sales_R_TY_PLN / Sales_U_TY_PLN
Sales_AUR_LY_PLN = Sales_R_LY_PLN / Sales_U_LY_PLN
Sales_AUR_WP_MGR = Sales_R_WP_MGR / Sales_U_WP_MGR
Sales_AUR_TY_MGR = Sales_R_TY_MGR / Sales_U_TY_MGR
Sales_AUR_LY_MGR = Sales_R_LY_MGR / Sales_U_LY_MGR

You can inspect how your measure rules will be exploded by the Modeler IDE by opening the Preview tab of your measure variant.

1.2.2. Non-Additive Computation

Because our rule contains a division it's a non-additive computation. This means we can't rely on the default aggregation (total) and spread (ratio) methods as we did for NetSales. Instead, we need to define a rule which is capable of calculating the Average Unit Retail for every possible intersection (e.g. the base intersection Sku,Store,Week, or intersections with aggregated levels such as Sku,Store,Month and Class,Country,Year).

You can achieve this by writing the rule as a CubiQL function expression which takes the intersection at which the data is being displayed:

fun [inter = $$BASE] in
  $Sales_R[inter] / $Sales_U[inter]

Modeler will pass the current intersection at which the data is being displayed (e.g. Class,Country,Year) to the rule via the argument inter. We declare a default value for this argument which is the base intersection of the Sales measure. Notice how we use the measure syntax variable $$BASE which is automatically substituted by the correct base intersection. In this example, the base intersection depends on the role: for planners (PLN) this is Sku,Store,Week and for managers (MGR) this is Class,City,Week. Let's take a look at the complete list of rules for all derived measures after exploding this rule containing the $$BASE variable:

Sales_AUR_WP_PLN = fun [inter = {Sku,Store,Week}] in Sales_R_WP_PLN[inter] / Sales_U_WP_PLN[inter]
Sales_AUR_TY_PLN = fun [inter = {Sku,Store,Week}] in Sales_R_TY_PLN[inter] / Sales_U_TY_PLN[inter]
Sales_AUR_LY_PLN = fun [inter = {Sku,Store,Week}] in Sales_R_LY_PLN[inter] / Sales_U_LY_PLN[inter]
Sales_AUR_WP_MGR = fun [inter = {Class,City,Week}] in Sales_R_WP_MGR[inter] / Sales_U_WP_MGR[inter]
Sales_AUR_TY_MGR = fun [inter = {Class,City,Week}] in Sales_R_TY_MGR[inter] / Sales_U_TY_MGR[inter]
Sales_AUR_LY_MGR = fun [inter = {Class,City,Week}] in Sales_R_LY_MGR[inter] / Sales_U_LY_MGR[inter]

You can see how your measure rules will be exploded by the Modeler IDE by opening the Preview tab of your measure variant.

When the measure service evaluates these rules, it first aggregates the value of $Sales_R and $Sales_U to the provided intersection inter using the default aggregation method of these (derived) measures. Then, the result of the division is returned as the value of $Sales_AUR for the provided intersection inter.

1.2.3. Inverse Rules

For the inverse groups of $Sales_R and $Sales_U, we'll also be using CubiQL function expressions since we need to be able to calculate these inverses at the intersection at which the data is being displayed. We can use the following CubiQL rule for the inverse group of $Sales_R:

fun [inter = $$BASE] in
    Input * $Sales_U[inter]

And the following inverse rule for the inverse group of $Sales_U

fun [inter = $$BASE] in
    $Sales_R[inter] / Input

2. Reusable Expressions

The "Expressions" view of the Modeler IDE allows you to configure reusable CubiQL expressions for your Modeler application. For more information about this view, see Expressions.

2.1. Functions

The following example shows how a function for linearly rescaling values from one range to another range can be configured in the Modeler IDE.

After configuring this minmax expression, it can be used in all CubiQL expressions within the Modeler IDE project.

CubiQL REPL

Test your expressions while developing your application in the CubiQL REPL:

$ lb measure-service repl --uri ws://localhost:55183/ide-planning-app/websocket/measure

Welcome to the
  ___     _    _  ___  _      ___ ___ ___ _
 / __|  _| |__(_)/ _ \| |    | _ \ __| _ \ |
| (_| || | '_ \ | (_) | |__  |   / _||  _/ |__
 \___\_,_|_.__/_|\__\_\____| |_|_\___|_| |____|

Enter ':help' for a list of commands.

Connecting to measure service at ws://localhost:55183/ide-planning-app/websocket/measure ...
> minmax(50d, 0d, 100d, 0d, 1d)

value of decimal
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
          0.5d

Displayed all 1 result entries.

4. Mask Filter Expressions

The "Expressions" view of the Modeler IDE allows you to configure CubiQL expressions that can be used to specify mask filters for the sheet views of your Modeler application. For more information about this view, see Expressions.

The mask filter expression can either be position-only or have some arbitrary value type. Please note that the values of value-typed mask filter expressions are ignored, which means using the value false in a boolean-typed expression won't have any effect.

Use Cases

Mask Filters can be used to restrict the level members shown on a sheet view. For instance, when planning for future years in a planning application, you may only want to show data for current or future years when levels of the Calendar dimensions are added onto one of the axes of the view.

4.1. Display Current And Future Weeks

Let's say we want to create a planner view that only shows Calendar data for the current and future weeks. In this case, we can configure a mask filter expression to determine which positions of the Week level should be visible in the sheet view.

Our mask filter expression should return all positions of level Week that should be included in the view. In our example application, we have a position-only measure ElapsedWeek that can be used to calculate the difference between the list of available Week positions and the Week positions that have been marked as elapsed by the measure ElapsedWeek:

To apply this mask filter expression to a sheet view, select the WeekMask expression as a "Mask Filter" for that sheet view.

4.2. Display User Selection

Our example applications contains a "Sku Maintenance" canvas view that allows users to maintain Sku level data such as its description. This view will only display a subset of the Sku positions in the bottom "Sku Maintenance" sheet based on a selection by the user in the top "Sku Mask Selection" sheet:

We can implement this user selection by defining a position-only measure SkuUserMask which is keyed by Sku,User. This measure will be used to store the positions of the Sku level that each User wants to maintain in the "Sku Maintenance" view. We display the SkuUserMask measure on the top "Sku Mask Selection" sheet view with the User level on the Slices axis.

To complete the "Sku Maintenance" canvas view, we then need to define two mask filter expressions:

  • CurrentUserMask - mask filter expression that only returns the position of the User level for the current user. This mask filter expression is used in the "Sku Mask Selection" sheet view to make sure the User level on the Slices axis is resticted to the current user.

    This CubiQL expression uses a filter expression to derive the position of the User level that represents the current user. The variable $modeler_CurrentUser contains the id of the user that's currently logged in to the Modeler application.

  • SkuMaskByCurrentUser - mask filter expression that returns the positions of the Sku level that should be displayed for the current user as stored in the measure SkuUserMask. This mask filter is used to make sure users only see their own selection of Sku positions in the bottom "Sku Maintenance" sheet view.

    This CubiQL expression uses a dice expression to derive the positions of the Sku level that represent the selection of the current user (defined by the expression CurrentUserMask).

Populating User Dimension

As mentioned, the position-only measure SkuUserMask is keyed by Sku,User. The User level contains a position for each user in our application.

This can be implemented by first adding a User dimension with a default hierarchy that contains a User level. To populate this User level, we can use a LogiQL rule (EDB) to insert a User position for each user that's added in the LogicBlox credentials database of the Modeler application:

 
block(`user) {

  clauses(`{
    +User:User(u),
    +User:User:id[u] = id,
    +User:User:label[u] = id <-
      +system:app:User:name[_] = id.
  })

} <-- .

This logic can be added under the src/logiql directory of the Modeler IDE project.

Make sure to exclude the import of the User level in the "Import Hierarchies" step of your workflows when using logic to populate this level. For more information about managing user data using workflows in the Modeler IDE, see User Data.

5. Historical Locking

Historical locks are defined as CubiQL expressions that specify the keys that need to be locked (e.g. a level such as Week in the Calendar dimension). The "Locks" view of the Modeler IDE allows you to configure lock expressions for your Modeler application. For more information about this view, see Locks.

Use Cases

Measures are typically configured in the Modeler IDE as read-only or editable. Oftentimes, in planning applications, we want some measure to be editable, but we also would like to block the user from being able to update data from the past. We call this historical locking.

For example, in a planning application we would typically apply a lock on all the working plan measures, so that they can only be updated for the current and future weeks or months.

5.1. Locking Measure

Even though we could express the positions to lock by just using a CubiQL expression, we commonly use a locking measure in planning applications to configure the Week or Month positions that need to be locked. An application developer can use LogiQL to populate this measure with all positions that need to be locked in the application (for instance based on the current date or the date of the most recent import or export of data).

The following measure is an example of such a locking measure. In this case, the locking measure ElapedWeek is a position-only measure keyed at Week.

In our example application, this measure contains the positions of Week that should be locked:

$ lb measure-service repl --uri ws://localhost:55183/ide-planning-app/websocket/measure
<6>2020-05-12 12:40:54,97800+00:00  INFO lb-web-client      - LB_DEPLOYMENT_HOME environment variable is not defined
<6>2020-05-12 12:40:54,98000+00:00  INFO lb-web-client      - Using default LB_DEPLOYMENT_HOME=/Users/niels/lb_deployment

Welcome to the
  ___     _    _  ___  _      ___ ___ ___ _
 / __|  _| |__(_)/ _ \| |    | _ \ __| _ \ |
| (_| || | '_ \ | (_) | |__  |   / _||  _/ |__
 \___\_,_|_.__/_|\__\_\____| |_|_\___|_| |____|

Enter ':help' for a list of commands.

Connecting to measure service at ws://localhost:55183/ide-planning-app/websocket/measure ...
> ElapsedWeek

Calendar : Week
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
    "20170125"
    "20170118"
    "20170208"
    "20170201"
    "20170104"
    "20170111"
    "20170322"
    "20170315"
    "20170405"
    "20170329"
    "20170222"
    "20170215"
    "20170308"
    "20170301"
    "20170517"
    "20170510"
    "20170531"
    "20170524"
    "20170419"
    "20170412"
    "20170503"
    "20170426"
    "20170712"
    "20170705"
    "20170726"
    "20170719"
    "20170614"
    "20170607"
    "20170628"
    "20170621"

Displayed 30 out of 157 result entries.

5.2. Locking Expression

When we apply a lock to a measure in a Modeler application, the result of the locking expression should match up with the intersection of measure that's being locked. We can take care of this by using a refine expression in our lock expression.

For example, if you're using the lock expression for locking a sales measure keyed at Sku,Store,Week, you can use the following refine expression:

> refine ElapsedWeek @ {Sku,Store,Week}

Calendar : Week ┊ Location : Store ┊       Product : Sku
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
    "20170125" ┊        "store-4" ┊       "Clementines"
    "20170125" ┊        "store-4" ┊      "Granny Smith"
    "20170125" ┊        "store-4" ┊            "Ginger"
    "20170125" ┊        "store-4" ┊      "Blood Orange"
    "20170125" ┊        "store-4" ┊   "Pink Grapefruit"
    "20170125" ┊        "store-4" ┊ "Honeycrisp Apples"
    "20170125" ┊        "store-4" ┊     "Navel Oranges"
    "20170125" ┊        "store-1" ┊      "Granny Smith"
    "20170125" ┊        "store-1" ┊ "Honeycrisp Apples"
    "20170125" ┊        "store-1" ┊      "Blood Orange"
    "20170125" ┊        "store-1" ┊       "Clementines"
    "20170125" ┊        "store-4" ┊          "Radishes"
    "20170125" ┊        "store-4" ┊             "Beets"
    "20170125" ┊        "store-1" ┊     "Navel Oranges"
    "20170125" ┊        "store-1" ┊   "Pink Grapefruit"
    "20170125" ┊        "store-3" ┊ "Honeycrisp Apples"
    "20170125" ┊        "store-3" ┊     "Navel Oranges"
    "20170125" ┊        "store-3" ┊       "Clementines"
    "20170125" ┊        "store-3" ┊      "Granny Smith"
    "20170125" ┊        "store-1" ┊             "Beets"
    "20170125" ┊        "store-1" ┊            "Ginger"
    "20170125" ┊        "store-3" ┊   "Pink Grapefruit"
    "20170125" ┊        "store-1" ┊          "Radishes"
    "20170125" ┊        "store-2" ┊     "Navel Oranges"
    "20170125" ┊        "store-2" ┊   "Pink Grapefruit"
    "20170125" ┊        "store-2" ┊      "Granny Smith"
    "20170125" ┊        "store-2" ┊ "Honeycrisp Apples"
    "20170125" ┊        "store-3" ┊            "Ginger"
    "20170125" ┊        "store-3" ┊      "Blood Orange"
    "20170125" ┊        "store-3" ┊          "Radishes"

Displayed 30 out of 5652 result entries.

We do run into a problem when we want to use the locking measure for locking measures keyed at higher intersections of the Calendar dimensions such as Month or Year:

> refine ElapsedWeek @ {Sku,Store,Month}
Problems during preprocessing in REPL:
[ERROR] (row 0 and column 7 to row 0 and column 18) Cannot refine from { Calendar.Week } to { Product.Sku, Location.Store, Calendar.Month }, since the latter is not below the former in the intersection lattice.

To solve this, you can use the following CubiQL collect expression to determine the months that should be locked based on the week positions in the locking measure:

> collect( refine ElapsedWeek @ ( interof(ElapsedWeek) & {Sku,Store,Month} ) ) @ {Sku, Store, Month}

Calendar : Month ┊ Location : Store ┊       Product : Sku
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
        "2017-01" ┊        "store-4" ┊      "Granny Smith"
        "2017-01" ┊        "store-4" ┊ "Honeycrisp Apples"
        "2017-01" ┊        "store-4" ┊      "Blood Orange"
        "2017-01" ┊        "store-4" ┊       "Clementines"
        "2017-01" ┊        "store-4" ┊     "Navel Oranges"
        "2017-01" ┊        "store-4" ┊   "Pink Grapefruit"
        "2017-01" ┊        "store-1" ┊ "Honeycrisp Apples"
        "2017-01" ┊        "store-1" ┊     "Navel Oranges"
        "2017-01" ┊        "store-1" ┊       "Clementines"
        "2017-01" ┊        "store-1" ┊      "Granny Smith"
        "2017-01" ┊        "store-4" ┊             "Beets"
        "2017-01" ┊        "store-4" ┊            "Ginger"
        "2017-01" ┊        "store-1" ┊   "Pink Grapefruit"
        "2017-01" ┊        "store-4" ┊          "Radishes"
        "2017-01" ┊        "store-3" ┊     "Navel Oranges"
        "2017-01" ┊        "store-3" ┊   "Pink Grapefruit"
        "2017-01" ┊        "store-3" ┊      "Granny Smith"
        "2017-01" ┊        "store-3" ┊ "Honeycrisp Apples"
        "2017-01" ┊        "store-1" ┊            "Ginger"
        "2017-01" ┊        "store-1" ┊      "Blood Orange"
        "2017-01" ┊        "store-1" ┊          "Radishes"
        "2017-01" ┊        "store-1" ┊             "Beets"
        "2017-01" ┊        "store-2" ┊   "Pink Grapefruit"
        "2017-01" ┊        "store-3" ┊          "Radishes"
        "2017-01" ┊        "store-2" ┊ "Honeycrisp Apples"
        "2017-01" ┊        "store-2" ┊     "Navel Oranges"
        "2017-01" ┊        "store-3" ┊      "Blood Orange"
        "2017-01" ┊        "store-3" ┊       "Clementines"
        "2017-01" ┊        "store-3" ┊             "Beets"
        "2017-01" ┊        "store-3" ┊            "Ginger"

    Displayed 30 out of 1332 result entries.

5.3. Lock Configuration

In the previous section, we defined a rather complex CubiQL expression to make sure we can use our locking measure ElapsedWeek for locking targets keyed at Sku,Store,Week and even higher intersections such as Sku,Store,Month or Sku,Store,Year.

To use this lock expression in the Modeler IDE, we could configure this lock expression using the measure explosion variable $$BASE (the base intersection of the measure to lock) as:

collect( refine ElapsedWeek @ ( interof(ElapsedWeek) & $$BASE ) ) @ $$BASE

Luckily, the measure service allows us to write simplified lock expressions. In our case, we can also just write ElapsedWeek and check the "Up On Some" setting of our lock to make sure the measure service uses collect to aggregate the expression to the base intersection of the measure to lock.

The following example shows this configuration of our historical lock in the "Locks" view of the Modeler IDE.

The lock can then be applied to measures in the "Measures" view: