Introduction

Data analysis and insight often requires the creation of formulas that don't exist in the data source. SiSense Prism offers a simple, yet powerful way to author multi-dimensional formulas that give you the power of multi dimensional analytics, through the use of the Formula Editor.

Before you start

Make sure you are connected to a data source called US Laptop Sales. If you aren't, go to the Connect to Data tutorial

Jump To:

  1. Step 1: Create new formula
  2. Step 2: Enter formula syntax
  3. Step 3: Add formula into the repository
  4. Step 4: Use the formula inside a Pivot widget
Start Video

Step 1: Create new formula

The first step is to create a new formula from within the Data Browser.

To do that:

1. Right click on the Measures dimension inside the Data Browser

2. Select the New menu item

Note:

Creating a new formula from within the Data Browser will allow us later on to reuse the formula in other documents and widgets that use the Laptop Sales Demo data source.


Step 2: Enter formula syntax

We wish to create a formula that represents profit. To get profit, we must enter the following syntax into the editor: [Sales] - [Cost]

To do that:

From within the formula editor

1.Click on the Add Data button

2. From the drop down menu, select Measures

3. From the Measures sub menu, select Sales

4. Type - (minus) in the formula editor, after the [Sales] measure

5.Add Cost in the same way you added Sales, by adding it from the drop down menu


Note:

The formula editor gives you constant indication on whether your formula syntax is correct or not. If you encounter a red underline inside the editor, you can move the mouse over it to see what the problem is. If the formula is valid, the formula editor displays a green area.

Valid formula:

Invalid formula:

Step 3: Add formula into the Data Browser's repository

After we have our formula ready, we wish to add it into the repository for future usage.

To do that:

From within the formula editor

1.Press [ENTER] or click on the button

2. Enter a formula name into the dialog, in our case it will be Profit.

3. Click on the OK button










The new Profit formula exists inside the repository now and we can reuse it.

Step 4: Use the formula inside a Pivot Widget

Now that we have our formula, we want to add it into a Pivot widget.

To do that:

1. Drag the Product dimension from the Data Browser and drop it over the Rows area inside the Widgets Data Layout Panel.

2. Drag the Profit formula and the Sales & Cost measures from the Data Browser and drop it over the Columns area inside the Widgets Data Layout Panel.

3.Click on the Update button, inside the Widgets Data Layout Panel.

Note:

If you wish to select multiple members/measures at once without to drag & drop each one separately, use the [Ctrl] key together with the left mouse button

Note:

If you never worked with a Pivot widget before, please refer to the following tutorial: working with Pivots