Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI DataLink

Compare events by including parent events

  • Last UpdatedMar 19, 2025
  • 4 minute read

You can use the Compare Events function to present information about parent events in the same row as an event. You can use this capability to compare any events from matching hierarchies, including events with different names. For example, suppose you have turbine startup events that have phase events, but some phase events have different names. With the Compare Events function, you can return a row for each phase event and show values from the parent event in separate columns within each phase-event row. The returned information can help you compare phase events.

  1. Select a cell in the worksheet where you want PI DataLink to start inserting the function array that contains the events.

  2. On the PI DataLink tab, in the Events group, select Compare to open the Compare Events task pane.

  3. Specify the criteria to find events.

    As you enter criteria, the Preview list updates to show the events that match the entered criteria.

    1. In the Database field, enter the PI AF database that stores the events.

      Specify in the format \\ServerName\DatabaseName. Select the field to open a list of databases that contain event templates in connected PI AF servers.

    2. In the Search start and Search end fields specify the time period that you want to search for active events.

      Enter a PI time expression. For example, to retrieve events that were active during the last month, enter *-1mo in the Search start field and * in the Search end field.

      Tip: To find events with a more specific relationship to this time period, such as events that started or ended during this time period, expand More search options and select an alternative method from the Search mode list.

    3. As necessary, specify additional criteria to refine the events that the function returns (shown in the Preview list).

      See Compare Events task-pane reference for a complete list of available fields.

      For example, use the Event template list to limit returned events to those based on a particular event template. You might select the template named StartUpPhase1 to analyze first-phase startup events.

  4. Use the Columns to display list to specify the columns in the returned function array.

    The list contains the names of attributes. By default, the list includes the virtual attributes generated for all events and the event attributes from the selected event template. The function identifies attributes by path. See Path notation for Compare Events function for information about supported path notations.

    1. Insert the parent-event attributes that you want included in the function array.

      See Add parent-event attributes as columns in the Compare Events task pane.

      For example, you might right-click some of the virtual attributes and then select Clone for parent event to insert the corresponding parent-event attributes, such as:

      ..|Event name

      ..|Start time

      ..|Primary element

    2. Select the columns to include in the function array and set the column order.

      You can:

      • Select the Select all check box to include all the listed attributes as columns in the returned function array.

      • Select a check box to include the attribute, or clear a check box to exclude an attribute as a column in the returned function array.

      • Type the name of an event attribute next to the blank check box at the bottom of the list.

      • Right-click an attribute, click Insert attribute to insert a blank attribute above the selected attribute, and then type the name of an event attribute.

      • Select an attribute and click Up arrow to move the attribute up in the list.

      • Select an attribute and click Down arrow to move the attribute down in the list.

      • Select an attribute and click Remove to remove the attribute from the list.

      • Right-click an attribute and then click Delete attribute to remove the attribute from the list.

  5. Verify that the Output cell field contains the worksheet cell where you want to insert the top-left corner of the function array.

    If you selected a cell before opening the task pane, PI DataLink automatically inserts that cell into this field.

  6. Select OK to insert the function array into the worksheet.

    Compare parent events

TitleResults for “How to create a CRG?”Also Available in