Using Lists to define the structure of your model

  • 21 December 2021
  • 0 replies
  • 1113 views

Userlevel 5
Badge +3

 

Lists are groups of related items, such as people in a department, products, or the regions comprising a geographic area. They are fundamental to Pigment as they define the structure and content of a model.

 

 

Table of Content

Check out this 3-minute video on the difference between Dimension and Transactions Lists in the Academy course Pigment Lists

 

 

List Types

 

Dimension Lists

 

Dimensions define the structure of your data. These lists are created once and then used through out your entire Application.  They can also be shared to other Applications.  In most Applications, you will have Calendar dimensions, such as Years, Quarters, and Months.  There will also be Application specific examples such as Products, Countries, Departments, and Employees.

Think of Dimensions as a way to describe how you want to display your data.  A good practice is to use the word “by” before them. For example, I want to display the list of Employees by Month, by Country and by Cost center in a table. In this case, create the Months, Countries and Cost Center dimensions in the application so that you can reuse them within other Metrics and Tables

Lists are made of of items.  Each item in a Dimension list must be unique. Pigment needs to know which item is being referenced when you are using the Dimension lists in multiple metrics.

 

Due to the way that Pigment handles sparsity, or the lack of data for cells, there is no need to create subset of dimensions. Options such as Hide empty rows or columns or Dynamic Selection to hide sparce cells.

 

Transactions Lists

 

Transactions are lists of items that need to be transformed or grouped for analysis.  Unlike Dimension Lists, Transaction list items do not need to be unique. 

They usually represent a list of events. For example a list of orders, transactions or a human resources ledger that use functions and formula such as the BY modifier to group for analysis. 

 

Transactions Lists can not be used as structure of a Metric.  They can only be referenced in formulas.

 

Change the type of List 

 

You can change the type of list from Dimension to Transaction and vise versa.  If a Dimension list is used in the structure of a Metric, it must be removed as structure before it can be converted to a Transaction lists.  If it is just referenced in Formulas, it can be updated.

Use the following steps to change the list type

  1. Navigate to the list you wish to change
  2. Click on Block settings (cog wheel) in the top right corner.
  3. In the General section, under list type, click the “Change to” button.

 

Properties

 

List Properties contain metadata—additional information about List Items. For example, in a list of Employees, you could add Properties such as Employee Preferred Name, the Department they work in, etc.

Properties can be used in calculations or to drive the aggregation of data through a model. Group properties can be used to establish hierarchies.

 

Creating a new Property

 

To create a new Property, click on the Configure button, the configure panel will open and you will see the sections Pages, Groups and Properties. Click on the + button in the Properties section.  You can also right click on a heading in the list and select Insert new Property right or Insert new Property left, this will allow you to easily choose the location of your property.  If you add within the Configure panel, you can always drag and drop properties in the panel to reorder them.

In the popup that just opened:

  1. Give it a Name
  2. Select a Type (see below, "Property types" section)
  3. Define if the items of this new Property should be Unique or not. This constraint ensures that all values are different from one another preventing users to enter the same value twice.
  4. Click Save, if you want to add another property, click Save & add another. 

 

Filling a Property with a formula

 

You can enter a formula to fill the Property. Click on any cell of the column and you can enter your formula in the top bar. 

 

Editing and Deleting Properties

 

To modify or delete a Property,

  1. open the Configure panel:

  2. go to the Properties section

  3. click on the Property settings ... of the Property you want to edit.

  4. click on Edit Property

 

From there, you can change the name, type or delete this Property.

Warning 

Note that if you change the type of a Property with data in it, the data will be deleted. If you add a unicity constraint, duplicated inputs will be removed.

 

 

List's Items

 

Items belong to a List, they can be referenced anywhere in the model by using a formula with syntax '<List Name>'."<List Item>"

Note that if you change an Item of a List, all the Metrics  associated with it are immediately updated.

 

How to add an item

 

From within the list, click on + Add item to create a new item for your list. If you want to create multiple items, you can the Add multiple Items icon.  If you choose to add multiple items, you can choose between adding 5, 10, or enter a custom amount of items to add.  

Once you click these options, you will have the new Items ready

 

 

How to reorder items

  1. Click on Edit List
  2. Use the small arrow to order your Items
  3. Once finished, click on the button Done

 

How to Delete Items

  1. Click on Edit List
  2. Tick the box of the Items you want to delete
  3. Click on the button Delete to remove the Items
  4. Once finished, click on the button Done

 

 

 


0 replies

Be the first to reply!

Reply