Target Label

This article applies to the Target Label in versions 4.4 and later of P2 Explorer.

Overview

The Target Label shows two values side by side: a numeric value and a percentage of the value in relation to a target value.

The percentage value is shown using a background colour that changes depending on how much it varies from its target. By default, the bar is red when the value is below the target, or grey when the value is at or above the target value.

The following diagram shows a Target Label being configured:

Target Label 4.4

 

Actual: The column from the dataset that determines the actual value.
Target: The column from the dataset that determines the Target value.
Threshold: The threshold at which to show a warning (red label). This is the percentage of the actual value compared to the target value.
If you are concerned when the actual value is less than the target value, you should use a negative number for the threshold (e.g. -50 will make the warning appear when the actual value is less than 50% of the target value). 
If you are concerned when the actual value is more than the target value, you should use a positive number for the threshold (e.g. 50 will make the warning appear when the actual value is more than 50% of the target value).
Decimals: The number of decimal points that the actual value should be displayed as.
Target Decimals: The number of decimal points that the target value should be displayed as.
Units: Represents the units that the value is expressed in.
Reverse Threshold: Invert the thresholds so that the warning appears in the opposite way. E.g. When the actual value is less than the target value and the threshold is a negative number (e.g. -50), the warning will appear when the actual value is more than 50% of the target value. 
Style: The style you want to apply to the component. If you are a Style Administrator, you can add a new Target Label style.

Related: Reading the Target Label in display mode, Adding a Target Label style

 

Tutorial: Creating a Target Label

If you're unfamiliar with the process of building pages, read the article Building an Explorer Page.

The Target Label is a useful component to display levels. In this topic, we’ll show you how to use the Target Label to display actual vs target production for a selected well. This is often used in production summary reports.

Target Label 4.4 

Let’s go through this process, step-by-step.

Note: This configuration uses the Sample Data table and datasets that can be optionally made available during initial installation and setup. If you don't have access to this data, you will need to adjust the configuration to suit your data at your site.

 

Step 1. Prepare a Studio Page

New Page button on ribbon

Before you start, click the New Page button on the Home tab of the ribbon. Choose the Grid layout.

Grid Layout 4.4

  • For this exercise, we'll keep the 4 grid cells.
  • Assign the first column a width of 200.
  • Assign the 2nd column a width of 200.
  • Assign a column spacing of 20.
  • Assign the first row a height of 50.
  • Assign a row spacing of 20.

Related: Grid Layout tutorial

 

Step 2. Add the Target Label

Target Label 4.4

Drag and drop the Target Label component onto a grid cell. The Target Label is in the Display Display group icon group.

 

Step 3. Configure the Target Label

Target Label 4.4

In this example, we want the Target Label to show us actual gas production versus planned production, compared with a threshold of 10%. We'll configure these 3 values separately.

Related: Data SelectorFilter Column and Filter Value

Configuring the Actual Value

  • Open the Actual Data Selector by clicking on the field. You will notice that the Value Data selector Value icon tab is automatically selected. However, for this tutorial, we want to get data from the Well Planning Data dataset query, so click the Dataset Dataset icon tab. Fill in the fields as follows: 
     

    • Dataset Query: WellPlanningData
    • Filter Column: Entity
    • Filter Value: (Variable) selectedEntities
      Note: You will need to type this in, it will not be available for selection.
    • Value Column: GasActual
      Note: See Filter Column and Filter Value for more information on how these fields work.
       
    • EndDate: (Variable) endTime
    • EntitiesList: (Variable) selectedEntities
      Note: You will need to type this in, it will not be available for selection.
    • StartDate: (Variable) startTime

Target Variation Bar 4.4

TOP TIP

Click the Preview button to check that you are getting data. If the preview window is blank, you may have filled in a parameter incorrectly.

 

Configuring the Target:

  • Click away from the Data Selector.
  • Open the Target Data Selector by clicking on the field. Click the Dataset Dataset icon tab. Fill in the fields as follows: 
     

    • Dataset Query: WellPlanningData
    • Filter Column: Entity
    • Filter Value: (Variable) selectedEntities
      Note: You will now be able to select this from the drop-down list.
    • Value Column: GasPlanned
       
    • EndDate: (Variable) endTime
    • EntitiesList: (Variable) selectedEntities
      Note: You will now be able to select this from the drop-down list.
    • StartDate: (Variable) startTime

Target Variation Bar 4.4

Configuring the Threshold:

  • Click away from the Data Selector. 
  • Open the Threshold Data Selector by clicking on the field. Stay on the Value Data selector Value icon tab. 
  • Type -10 into the Value field.

Here we are saying that the variation from target should never be more than 10 percent. If the variation ends up being 30% or more, the entire bar will be filled (to the left or right, depending if the value is below or above the target). 

Target Label 4.4

Configuring the Units:

If we want the label to show the units that the value is measured in, we can do this here. 

  • Click away from the Data Selector. 
  • Open the Units Data Selector by clicking on the field. Stay on the Value Data selector Value icon tab. 
  • Type mcf into the Value field.

The units appear between the actual value and the warning label. 

Target Label 4.4

You do not need to fill in the remaining fields.

 

Step 4. Set the Defaults 

Target Bar 4.4 default values

At the moment, the page shows the default values that have been set for the WellPlanningData dataset in P2 Server. This may not suit your intended purpose.

BEST PRACTICE

You should specify default values that are appropriate for your intended purpose.

 

Let’s change the default data that is displayed. We do this by creating defaults for the variables specified in the components in the previous steps. The variable we are interested in is the selectedEntities variable. Let's say we are interested only in the targets for a specific well, Beardy. We can set that here so that the user does not have to specify it.

  • Click the Default Values button on the Studio toolbar.
  • Click the Add button.
  • Add a variable called selectedEntities with a type of EntityList. Type in the following entity name: Beardy

You should now see the Target Label update to reflect the new default.  

Related: Variables, Default Values

 

Step 5. Add the Date Picker

Target Label 4.4

This step allows the user to select a date, which will update the Target Label with values for the selected date.

  • Drag and drop the Date Picker component onto the canvas.
  • There is no need for further configuration as we are able to use the default values for Start Date/Time and End Date/Time. We used these variables during configuration of the Target Label.

Related: Date Picker tutorial

 

Step 6. All done!

Target Label 4.4

Congratulations! You now have a Target Label that will show you actual vs target oil production for a selected well.

  • Click the preview preview button on the Studio toolbar to see what your page will look like in run-time.
  • Select entities and observe the changes in the target label values and colours.

save Don’t forget to save your page!

Comments are closed