Use analytics

Now that your deployment contains linked entities, you have made a significant step towards developing and displaying analytics.

With Decision Insight, you can build a variety of simple or complex analytics. In this tutorial, you are going to learn the basics first.

1. Create analytics for counting new purchase orders

Create a space to store your attributes

It is important that you maintain a well-organized deployment. To do so, create a space where you can store all of the dashboard attributes you are going to create.

Create a space named Analysis

Step Action

On the main menu, click Configuration . On the left menu, click Spaces.


Click the New space button. A new pane opens on the right side of the screen for configuring your new space.


In the Name field, enter Analysis. The product automatically fills the Key field to Analysis.

You can leave the other fields as is.


Click Save to complete the creation of your space.

Create a dashboard for your analytics

Over the next few tasks, you will create a specific dashboard for analytics comprised of three areas:

  1. An area which displays a count of all purchase orders that arrived today.
  2. An area which displays all purchase orders that are still being processed according to the time set via the time machine controls.
  3. An area which displays all purchase orders completed today.

To create a new dashboard, follow these steps.

Step Action

On the main menu, click the home icon or the All dashboards icon.

2 Click the Create dashboard button. The new dashboard screen is displayed with one pagelet area defined.

In the Enter title here text box, enter Overview.


Click the Split Horizontally icon so you have two pagelet areas, one on the left, and one on the right.


In the left pagelet area, click the Click here to configure the pagelet button. The new pagelet screen is displayed.


Click the Instance pagelet.The pagelet page is displayed.


From the list of available entities, drag and drop Global to the instance dimensions area.


In the instance selection area, click Global.


In the Values area, click the Add value button. A list of data display options (or mashlets) is displayed.


Click the Value mashlet.


Click the select attribute hyperlink. A list of attributes for the Global entity is displayed.

2. Understand the derive and aggregate attributes

You are currently selecting attributes which will be displayed in the pagelet of your dashboard. In the list of attributes for Global, the top one should be 2Orders, that is the reverse relation attribute from Order to Global. In the Actions column for 2Orders, two actions are available:

  • Derive—extract information about the link between the two entities.
  • Follow—follow the relation towards the Order entity.

About the derive attribute

Click Derive for the 2Orders attribute. The new attribute - derive screen is displayed.

Aside from the Name area, the screen is divided into the following areas:

  1. The settings or settings area. Specify how to use the derive attribute.
  2. The function area. Specify how Decision Insights calculates the derive attribute. The Function drop-down list provides the list of all derive functions available depending on all the other applicable settings you might be using. Here, the only choice is Count.
  3. The time range area. Specify how the deployment looks for (and looks at) the data that is input to the count function.
  4. The input attributes area. Specify which attributes are used for the derive function.
  5. The time controls area. Specify when the deployment executes the derive function.

Once you've looked at the new derive attribute screen, click Cancel on the top right to return to the previous screen.

About the aggregate attribute

Now that you are back on the Select an Attribute page:

Step Action

Click the Follow option for 2orders. The Follow option acts like a passageway from Global to the instances of Order. 


To know the number of instances of orders in the deployment, click Aggregate in the Actions column for the Instance attribute. The new aggregate attribute screen is displayed. 

Aside from the Name area, the screen is divided into the following areas:

  1. The path area. Displays the direction your data follows from one linked entity to the next
  2. The attribute settings area. Specify how to use the attribute you want to aggregate.
  3. The Aggregate function area. The Function drop-down list provides the list of all derive functions available depending on all the other applicable settings you might be using. Here, the only choice is Count.
  4. The time selection area. Specify how the deployment looks for (and looks at) the data that is input to the count function.
  5. The input for the function area. Specify which attributes are used for the derive function.
  6. The time controls area. Specify when the deployment executes the derive function.

Note: The Aggregate and Derive function screens look similar because they accomplish similar goals but from opposite sides of the Order/Global relationship.

Now that you know more about derive, follow, and aggregate, start to define your overview dashboard. 

Step Action

Click Cancel to return to the previous screen.


Keep clicking Cancel until you are back to the pagelet definition page, the one that looks something like this:

3. Define a New Today pagelet

Start defining the first pagelet in your dashboard. This pagelet will display the count for new purchase orders received today.

Step Action

You haven't given this pagelet a title yet. Call it Orders Received Today. In the Values section, click Add Value.


Click the Select an attribute hyperlink.


From your exploration above, you know that there are two very similar ways to calculate the count of instances of orders. For 2Orders, click the Derive hyperlink.


In the Settings area, for Compute, select 5 minutes.

Reminder: The default rhythm of your application is 5 minutes. This means when you select a time machine interval for data refresh, the interval must be a multiple of 5 minutes.


In the Computed using area, leave the Function drop-down set to Count.

6 In the Time range area, you want to the pagelet to report all new purchase orders received today. For a count to last the whole day, select a range that covers the whole day too. For the current drop-down, select 1 day.
7 The Inputs area should describe what you've selected so far, that is to derive the count of 2 orders.

In the Time controls area, click the hyperlink about time range.


In the Dimension to correlate with drop-down, select Time range.


Select the retrieve occurrences of 2Orders that option. You want the occurrences that begin during the Time Range.

For more information and a case study about this screen, see Time configuration and visual hints below.

11 Click Done.
12 In the Settings area, for Space, select Analysis.

Give a name and a description to the Derive attribute. It is a good practice to be as complete and descriptive as possible.

For example, consider the following as a name and description:

Name: Derive-Count-2orders-Begin-Time-Range-Current-Day

Description: Count of 2 orders that begin over interval, current day, computed every 5 minutes

For more information about naming attributes, see Naming conventions below.


Click Save. A pop-up message is displayed about the consequences of saving the attribute.

The statement is accurate – defining a new attribute in the past will trigger background computation (more about that later). However, this message is over-cautious given that your solution does not contain a lot of data yet.

Click Yes. There is no reason for concern in this case. The Select attribute screen is displayed.

15  Wait just a second when you're on the Select an attribute screen. Decision Insight will highlight the attribute you have just created.
16  Click the Select hyperlink for the Derive-Count-2orders attribute. Click Done. You are brought back to the pagelet screen.  

Click Done to accept the changes to your pagelet and then click Save to accept the changes to the dashboard.

What you see may be a disappointment. Depending on the settings of your time machine controls, you will see a large white space with a small number between 0 and 4.

Go more in-depth

Naming conventions

It is recommended to name any element where Decision Insight provides you with a title box as soon as you have the opportunity. This accomplishes two things:

  1. It makes you stop and think about what you intend to accomplish. Do include that as part of your name. 
  2. It prevents the inconvenience of Decision Insight either asking for a name or choosing Untitled as a default name for you.

Tip: Give your analytic an obvious, self-explanatory name. This is a good way to avoid people in your organization creating the same attribute several times because they do not realize that the analytic they want to use is already available. 

Important: Use care in naming. While it is possible to rename attributes and even track down and eliminate duplicate attributes, it is time-consuming and not without the opportunity for error. 

When you use the Derive and Aggregate functions, you are also creating instances associated with the entity that you are using as the base of the analytic.The next time you look at the list of the available instances in your application, an instance of your Derive or Aggregate attribute will be listed. It is important for you and any other user of the deployment to know and understand how the attribute you created will appear if selected for display.

Attribute time range configuration

Looking at the Time Range section you can see three options.

The two possible selections are current and last.

In this part of the tutorial, you selected the current option for 1 day. On your dashboard, this selection implies that you want to see data based on a time range from midnight this morning until midnight this evening.

If you select last, for example, the last 24 hours, your dashboard would display data based on a time range between right now and the past 24 hours. 

Time configuration and visual hints

As you saw in a previous part of the tutorial, time configuration offers a number of flexible options. It is recommended that you take advantage of the visual hints area to determine the option that gives you the results you want.  

The following is a case study on time configurations. Let's assume that a new purchase order arrived yesterday and another one today at 12-hour intervals – 15 minutes after midnight and 15 minutes after noon. Each purchase order requires 16 hours to finish. This means that the order that arrived just after noon yesterday was completed at 4:15 this morning.

If it helps, create a mental image of those purchase orders arriving and completing yesterday and today. Just keep this time configuration case study in mind.

Assume that it is now 2 PM. Here are the time configurations case study data presented in a table:

Order number Arrived  Completed

Yesterday at 00:15

Yesterday at 16:15
2 Yesterday at 12:15 This morning at 04:15
3 This morning at 00:15 In process at 14:00
4 Today at 12:15 In process at 14:00

If you look at the description and the visual hint, what do you think that your pagelet would show for the count of instances of your Order entity at 2 PM?

Consider that the time range you selected was the current 1 day. That 1-day range is represented in the visual hint by the shaded rectangle. For this time configuration study, the current time (2 PM) falls somewhere in the middle of the shaded area. What is the count of orders that exist based upon the selection (to retrieve the count of 2orders when the time range starts)?

Is that value:

  • 0
  • 1
  • 2
  • 3

Answer: The correct answer is 1. Map out the time range (today) and the requested point in time (when time range starts). Purchase order number 2, the one that arrived just after noon yesterday was still in process when the time range started, at 00:00 this morning. Purchase orders 3 and 4 will arrive during the current day, they had not arrived at the start time of the day, so they are not included in the count. 

Confused? See if more examples can help sort it out. 

One important note to remember: visual hints are just hints. The image showing instances of 2orders are not drawn to reflect your data. Those lines represent possible combinations, not reality. If your answer was "2" you might have taken the hint as actual data. 

Here is a visual depiction of the actual situation. This is not a hint, this is reality.

Experiment with the options. What happens if you change the selection in the third drop-down list, to change the selection from Time Range starts to Time Range ends. Still using the same time configuration case study used in the previous example, what is the count of orders that exist now based upon the selection (to retrieve the count of 2orders when the time range ends)? 

Is that value:

  • 0
  • 1
  • 2
  • 3

Answer: The correct answer is 2, but it is a somewhat special case – the time range (current day) has not ended, so the time range does not go all the way to midnight tonight, it stops at the current time. This diagram might help explain the case:

The boundary between the green and red shaded areas represent the difference between the past and the future. The time is currently 14:00. Order 3 is about to be completed and Order 4 arrived only recently. Those are the two that exist at the Time Range end.

To continue your exploration, click the Dimension to correlate with drop-down and see what your other options might be. You started with the default, Time Range. One of the other options Reference Time. That translates into no time range at all – it is simply another way to select Time machine instant. Since what this pagelet hopes to contain is the count of purchase orders received today, the count at the current instant would be of little help. What other options are there? 

There is an option to correlate with Global, your other entity. What would that do? When, for example, does the instance of Global start? When does it end?

Because Global exists from the start of your application and will exist until the end – whenever that is – correlating with it will not provide you with counts that have any bearing on what is happening during the current day. So that option will not do. However, there is something that might be of use in the visual hint. 

If you compare the gold line at the bottom of the selected time range in the Current Time before Time Range Ends figure with the similar gold line at the bottom of the Occurrences of 2orders that Begin during Global figure above, you can see that the meaning of the shaded box has changed between the two. When you are using the visual hint, it is a good practice to double check what the selected range might be. 

If Global does not work as the dimension with which to correlate, what other options are there? There is one that refers to New Temporal Dimension…. This would be a subject for more advanced study. 

Which brings us back around to the Time Range option. Select that from the drop-down list, and then select the Retrieve occurrences of 2orders that radio button. That selection opens up a whole new list of possible options. The figure below displays four of these options below. You can select each in turn and see how it affects the visual hint shown below the selections.

This has been a somewhat lengthy exploration. Remember that the objective has been to find the settings that would select the instances of 2orders that started during the current day. Because you selected the time range of current day, which of the four choices do you believe will provide the correct results:

  • begin during
  • end during
  • intersect
  • are included in

Answer: The correct answer was begin during.

Now you are ready to proceed to the next step.

Related Links