Compare events by including child events
- Last UpdatedMar 19, 2025
- 4 minute read
- PI System
- PI DataLink 2023 SP1
- Visualization
You can use the Compare Events function to compare events that have child events with the same names. The Compare Events function identifies attributes by path. Therefore, the function can return attributes from related events in a single row. For example, suppose you have turbine startup events that have phase events (child events that occur during the startup event). The Compare Events function can present a row for each startup event and show values from the corresponding phases in separate columns within each row. You can use this returned function array to easily compare the startup events.
-
Select a cell in the worksheet where you want PI DataLink to start inserting the function array that contains the events.
-
On the PI DataLink tab, in the Events group, select Compare to open the Compare Events task pane.
-
Specify the criteria to find events.
As you enter criteria, the Preview list updates to show the events that match the entered criteria.
-
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.
-
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.
-
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 TurbineStartUp to analyze turbine startup events.
-
-
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.
-
Select
to open the Add Attributes window and select the child-event attributes that you want to compare among parent
events.
See Add child-event attributes as columns in the Compare Events task pane.
-
Insert any parent-event attributes that you want included in the function array.
See Add parent-event attributes as columns in the Compare Events task pane.
-
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
to move the attribute up in the list.
-
Select an attribute and click
to move the attribute down in the list.
-
Select an attribute and click
to remove the attribute from the list.
-
Right-click an attribute and then click Delete attribute to remove the attribute from the list.
-
-
-
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.
-
Select OK to insert the function array into the worksheet.
