Skip to content
Software AthleteSoftware Athlete
PI Vision Calculations: List of all available functions

PI Vision Calculations: List of all available functions

A complete PI Vision calculation function reference with practical examples for value retrieval, time expressions, comparisons, strings, math, and range-based analysis.

Updated August 24, 2026 Originally published July 17, 2023 By Software Athlete PI System engineering team

PI Vision calculations are display-level expressions that combine PI points, AF attributes, operators, time expressions, and functions. They are useful when a calculation belongs to one display or dashboard and needs to be evaluated with the selected time range.

Start here

How to use the PI Vision function reference

Insert a data item into the calculation editor, then use the function name and argument pattern shown below as a starting point. Replace 'tag1' with a real PI point or AF attribute and keep time expressions in straight single quotes.

Current valueTagVal('tag1','*')
One-hour averageTagAvg('tag1','*-1h','*')
Conditional resultif('tag1' > 10) then 1 else 0

When a formula is not accepted, simplify it first. Confirm the data reference works by itself, then add one function, one operator, or one time argument at a time. This makes it easier to distinguish syntax errors from data, security, or time-range problems.

Choose by outcome

PI Vision calculation functions by job

01 · Data access

Read a value or range

TagVal, PrevVal, NextVal, TagAvg, TagMax, TagMin, TagSpan, and TagTot help retrieve or summarize PI data.

02 · Logic

Turn conditions into results

If, Or, NotEquals, and the Find* functions help classify states or locate a condition in a time range.

03 · Presentation

Format the display result

Text, Left, Trim, and UCase are useful when a table, label, or status symbol needs a readable text result.

The lookup table

Complete PI Vision calculation function reference

The examples below preserve the established function list while adding clearer group context and copy-friendly formatting. Test each expression against the PI Vision release and data reference used in your environment.

Function names, purpose, and example syntax.
Function What it does Example usage
Exp Calculates the exponential value of a number. Exp(2)
False Represents a Boolean false value. False
FindEq Finds the first occurrence of a specified value within a range. FindEq('tag1','-1d','*',50)
FindGE Finds the first occurrence of a value greater than or equal to a specified value. FindGE('tag1','-1d','*',50)
FindGT Finds the first occurrence of a value greater than a specified value. FindGT('tag1','-1d','*',50)
FindLE Finds the first occurrence of a value less than or equal to a specified value. FindLE('tag1','-1d','*',50)
FindLT Finds the first occurrence of a value less than a specified value. FindLT('tag1','-1d','*',50)
FindNE Finds the first occurrence of a value not equal to a specified value. FindNE('tag1','-1d','*',50)
Hour Extracts the hour component from a time expression. Hour('t')
If Returns one value when a condition is true and another when it is false. if('tag1' > 10) then 0 else 1
Left Extracts a specified number of characters from the left side of a string. Left('string',3)
Ln Calculates the natural logarithm of a number. Ln(10)
Max Returns the maximum value from a list of arguments. Max('tag1','tag2','tag3')
Min Returns the minimum value from a list of arguments. Min('tag1','tag2','tag3')
Minute Extracts the minute component from a time expression. Minute('t')
Month Extracts the month component from a time expression. Month('t')
NotEquals Compares two values and returns true when the first is not equal to the second. 'tag1' <> 'tag2'
NextVal Returns the next value after a specified time. NextVal('tag1','t')
Or Performs a logical OR operation on two Boolean values. 'tag1' or 'tag2'
PrevVal Returns the previous value before a specified time. PrevVal('tag1','t')
Round Rounds a number to the nearest integer or specified number of decimal places. Round('tag1',2)
Second Extracts the second component from a time expression. Second('t')
Sin Calculates the sine of an angle in radians. Sin(0)
TagAvg Calculates the average of a tag over a specified time range. TagAvg('tag1','-1h','*')
TagMax Retrieves the maximum value of a tag within a specified time range. TagMax('tag1','-1h','*')
TagMin Retrieves the minimum value of a tag within a specified time range. TagMin('tag1','-1h','*')
TagSpan Returns the span, or difference between maximum and minimum, of a tag. TagSpan('tag1')
TagSource Retrieves the point source string of a tag. TagSource('tag1')
TagTot Calculates the totalized value, or time integral, over a specified range. TagTot('tag1','y','*',85)
TagType Retrieves the type character of a tag, such as I, R, or D. TagType('tag1')
TagTypVal Retrieves the typical value of a tag. TagTypVal('tag1')
TagVal Retrieves the archived value of a tag at a given time. TagVal('tag1','23-aug-2012 15:00:00')
TagZero Retrieves the zero value of a tag. TagZero('tag1')
Tan Calculates the tangent of an angle in radians. Tan(1)
Tanh Calculates the hyperbolic tangent of a number. Tanh(1)
Text Concatenates strings representing argument values. Text(Round('sinusoid',1)," is the current value of 'sinusoid' at ",'*')
Total Returns the sum of two or more values. Total('tag1','tag2',TagVal('tag1','y'))
Trim Trims blanks from both sides of a string. Trim(" String ")
Trunc Truncates a number or time to the next lower unit. Trunc(28.75,10)
UCase Converts a string to uppercase. UCase("String")
Weekday Extracts the day of the week from a time expression. Weekday('*')
Year Extracts the year from a time expression. Year('*')
Yearday Extracts the day of the year from a time expression. Yearday('*')

Function availability and exact behavior can vary with the PI Vision and PI System versions in use. If a function is not accepted by the editor, confirm it in the documentation for the target release and test it with the same data reference used by the display.

Practical formulas

Patterns worth copying into a display

Retrieve one point value

Use TagVal when the display needs a value at a defined time.

TagVal('SINUSOID','*')

Summarize a range

Use a range function when the display should summarize the selected period rather than show one sample.

TagAvg('SINUSOID','*-8h','*')

Create a status result

Return a consistent numeric or digital result so a symbol can map it to a state or color.

if('CDT158' > 70) then 1 else 0

Build readable text

Combine Text with rounding when a table or label needs a human-readable message.

Text(Round('SINUSOID',1)," at ",'*')

Choose the right layer

When should a calculation move to AF Analytics?

PI Vision calculations are convenient for display-specific logic. A centrally managed AF Analysis is usually a better fit when the result must be reused across many displays, run on a schedule, be governed with a clear owner, be historized to an output point, or remain consistent when different users open different displays.

  • Keep it in PI Vision when the expression is local to one display or is being tested interactively.
  • Use AF Analytics when the calculation is an operational business rule that must be shared, scheduled, monitored, or maintained centrally.
  • Document the boundary so a future administrator knows whether to edit the display or the PI System configuration.

Make failures diagnosable

Troubleshoot PI Vision calculations by symptom

The editor rejects the expression

Check parentheses, commas, quotation marks, function spelling, and the placement of then and else. Use straight single quotes for data and time expressions.

The result is blank

Test the underlying point or attribute by itself. Then check the selected time range, archive coverage, substitution or security state, and whether the function returns a type the symbol can display.

The value looks wrong

Check the time context first. *, t, relative times, and absolute timestamps do not mean the same thing. Confirm the calculation uses the intended evaluation time.

The formula works only on one display

That may be the correct behavior for a display-level calculation. If several displays need the same governed result, move the logic to AF Analytics or another managed PI System layer.

Common questions

PI Vision calculation function FAQ

Are PI Vision calculation functions the same as AF Analytics functions?

They overlap in purpose but are not the same configuration surface. Validate the expression in the PI Vision editor and use AF Analytics when the result must be centrally managed or historized.

Why does a function work in one PI Vision display but not another?

The data reference, selected time range, user permissions, PI Vision version, or symbol result type may differ. Compare those inputs before changing the formula.

What is the difference between TagVal and TagAvg?

TagVal retrieves a value at a given time. TagAvg summarizes values across a specified time range.

Can a PI Vision calculation write a value back to the PI System?

A display calculation is primarily for evaluating and presenting a result. Treat writeback as a separate workflow with its own symbol, permissions, validation, and audit requirements.

Where can I find practical syntax examples?

See the companion PI Vision Calculation Syntax guide for setup, operators, time expressions, troubleshooting, and examples beyond the function lookup table.

Build more usable displays

Turn calculation logic into an operator workflow

Vision Library+ extends PI Vision with configurable symbols and controls that can make calculations, inputs, navigation, and operational context easier to use.

Explore Vision Library+
12 comments on PI Vision Calculations: List of all available functions
  • Lorenzo Hernandez Jr
    Lorenzo Hernandez Jr

    Hamish, IF should still be supported. I use it all the time in my PI Vision Calculations.

    November 25, 2023
  • Hamish Ritchie
    Hamish Ritchie

    Are you sure IF is still supported? I haven not managed to get it to work at all, and it does not appear in AVEVA’s list of supported syntax

    November 14, 2023
  • « Previous 1 2 3
Leave a comment

Your email address will not be published..

Cart 0

Your cart is currently empty.

Start Shopping