5.10 Background: Filtered data using custom expressions
When using different PI DataLink functions, we noticed an optional field of Filter Expression.
This option is available for the functions of:
• Compressed Data
• Sampled Data
• Calculated data
PI DataLink applies the filter expression to the raw data retrieved and only the values that make the
specified expression True, would be included. Therefore, for the two functions of Compressed Data and
Sampled Data, only the values that make the specified filter expression True would be listed in the output
cell. For the Calculated Data function, only the raw values that make the filter expression True, would be
considered in the calculations. With the use of Filter Expression, an option of Mark as filtered becomes
available for the Compressed and Sampled Data functions; if the Mark as filtered option is selected, a
Filtered status is returned for each group of values that does not satisfy the filter expression.
The Filter Expression is a performance equation and follows the formatting rules discussed in the previous
section.
References:
• For more information see "Expressions" in
PI DataLink User Guide.
5.11 Background: Excel conditional formatting
This topic is not specific to PI DataLink, but the Conditional Formatting found in Microsoft Excel can give
your PI DataLink reports a great perspective. It is useful for visually comparing values extracted from PI.
Conditional Formatting is found in the Home Ribbon in the Styles section. You can use this functionality to
provide highlighted maxima or minima, bar graph backgrounds, and many other visual cues about the data
being displayed.
To use this functionality, first highlight the group of cells you wish to format. Then click on the Conditional
Formatting button and choose a group and rule. For the Highlight Cells Rules and Top/Bottom Rules, you
will see a preview of the formatting once you configure the appropriate limits. For Data Bars, Colour Scales,
and Icon Sets, simply hover the mouse over each preconfigured option to preview its effect on the cells you
selected. Click the desired rule to select it.
Note: When using a cell reference for your Filter Expression, be sure that if the Filter Expression begins
with a timestamp or point name that you use two single quotes. The first single quote is used in Excel
to identify a text string, rather than a value, and will not be seen by the filter expression. Another
option is to enclose the entire filter expression in parenthesis, in which case the extra single quote is
not needed.