During my Analysis calculation I calculate a value which I would then like to look up on a table to see if a match exists, returning a boolean True. This lookup value does not come from a PI point attribute, it is a calculated date.

My analysis runs daily to parse PI data (a flow rate) and determine how to interpret it based on whether the previous day being a weekday or weekend, and needs to use this lookup to determine if a weekday is in fact a weekend day (holiday)

The detail:

I have a Library table 'Holidays' that contains a column 'Date'. The table data lists all the holidays applicable to the region. I want to lookup to see if the date being parsed (yesterday - 'y') exists in the table, returning TRUE if it is or FALSE if not.

My Issue:

I cannot see how to include this lookup based on data within the calculation (ie VLookup() in Excel) and pass it the data from the calculation. My research has shown how to do it based on input PI data references, but I can't see how to do this in the AF Analysis calculation.

As this will eventually be templated to operate across many elements in AF I need a way to dynamically look this data up from a common point.

You can create an extra column in your Holidays table called 'Result' and put that column all to TRUE.

Then your Table Lookup DR can be configured as below.

Notice that 'Result' returns True since 'Date' is in the Holidays table.

On the other hand, 'Result2' returns False since 'Date2' is not in the Holidays table.

'Date' and 'Date2' are your analysis output attributes.