{"id":9383,"date":"2016-02-16T15:19:38","date_gmt":"2016-02-16T07:19:38","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=9383"},"modified":"2026-01-29T16:43:26","modified_gmt":"2026-01-29T08:43:26","slug":"calculation-syntax","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/calculation-syntax\/","title":{"rendered":"Calculation Overview and Syntax"},"content":{"rendered":"\n<p class=\"left-bar-yellow\"><strong>Note<\/strong>: When copy-pasting examples, sometimes \" and ' may be substituted with curly quotes. In these cases, you will have to manually change them to straight quotes to get them to work in places such as the IFS OI Explorer trend.\u00a0<\/p>\n<h2 class=\"page-subheading\">Calculation Editor<\/h2>\n<p class=\"intro-text\">A calculation editor is available in both IFS OI Server Management and IFS OI Explorer, to make constructing, testing, and debugging calculations easier.<\/p>\n<p class=\"left-bar\">Read more: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/configuring-your-system\/creating-a-calculation\/using-the-calculation-editor\/\">Using the Calculation Editor<\/a>\u00a0<\/p>\n<h2 class=\"page-subheading\">How To Call Functions<\/h2>\n<p class=\"intro-text\">All functions take\u00a0the following form: <strong>FunctionName(arguments)<\/strong><\/p>\n<p class=\"intro-text\">All functions must be called using the () even if the function takes no arguments. E.g. <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/time\/\">Time<\/a>(). This is a change from v2.6.<\/p>\n<p class=\"intro-text\">Note that function names and arguments are not case sensitive.<\/p>\n<p class=\"intro-text\">Input arguments are separated with commas, and all have a <a href=\"#Dimension\">dimension<\/a><em>, <\/em><a href=\"#Data_Type\">data type<\/a><em>, <\/em>and <a href=\"#Behaviour\">behaviour <\/a>- these are described below and are listed separately in each function specification.\u00a0<\/p>\n<p class=\"intro-text\">In the function specification, square brackets [ ] \u00a0are used to indicate an optional input. The comma associate with the optional argument is included inside the square brackets.<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/function-calls.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31986 size-full\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/function-calls.png\" alt=\"\" width=\"370\" height=\"122\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/function-calls.png 370w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/function-calls-150x49.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/function-calls-24x8.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/function-calls-36x12.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/function-calls-48x16.png 48w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/a><\/p>\n<p class=\"intro-text\">The calculation engine evaluates the arguments\u00a0first and then calls the function. <br \/>\nExample: For\u00a0<strong>Abs(2-5)<\/strong>, the calculation engine\u00a0will evaluate <em>2-5<\/em> to calculate <em>-3<\/em>, and then call the <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/mathematical-expressions\/\">Abs()<\/a> function with the first argument\u00a0as <em>-3<\/em>. \u00a0To override this behaviour, use the\u00a0<a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/sampling\/\">Sampling<\/a>() or the Xyz_Sampled() functions.<\/p>\n<p class=\"intro-text\">A\u00a0function is only executed if the supplied input arguments\u00a0match the expected parameter specifications. E.g.\u00a0If a function expects an Integer but a String is supplied, the function will return an error and it will not be executed.\u00a0<\/p>\n<h2 class=\"page-subheading\">Comments in Calculations<\/h2>\n<p class=\"intro-text\">To add a comment to a calculation, use <span class=\"code-fragment\"><strong>\/\/<\/strong><\/span>\u00a0at the start of each line containing a comment. <br \/>\nComments can be used to add notes about a calculation and are not parsed by the calculation engine. <br \/>\nNote that these are not the same as standard <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/comments\/\">comments<\/a> entered in Server and Explorer, and are only visible in the calculation editor.\u00a0<\/p>\n<h2 class=\"page-subheading\">Tag and Entity Name Syntax\u00a0{ }<\/h2>\n<p class=\"intro-text\">In 2.6, the TAG, TAGNAME, ENTITY, and SAMPLING functions were used to denote tags in expressions.\u00a0<\/p>\n<p class=\"intro-text\">Curly braces { } allow tags and datasets to be used without requiring a function call. This syntax also\u00a0supports specifying overriding parameters which can modify the sampling parameters\u00a0on the dataset\/tag fetch.<\/p>\n<p class=\"note\">Note: Whenever you use a tag or entity name as a parameter within a function call, the tag or entity name must be wrapped in curly braces i.e. <strong>{tagname}<\/strong><\/p>\n<p class=\"intro-text\">Here are some examples:<\/p>\n<table>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong>2.6<\/strong><\/td>\n<td style=\"padding-left: 5px;\"><strong>4.4<\/strong><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">TAG(tagname)[samplemethod=average,sampleinterval=20]<\/td>\n<td style=\"padding-left: 5px;\">{tagname,sampleMethod=\"average\",sampleInterval={du'00:00:20'}}<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">SAMPLING(tagname,\"Average\",20)<\/td>\n<td style=\"padding-left: 5px;\">{tagname,sampleMethod=\"average\",sampleInterval={du'00:00:20'}}<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">SAMPLING(tagname*1200)<\/td>\n<td style=\"padding-left: 5px;\">{tagname}*1200<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"intro-text\"><strong>Entity and Attribute Names<\/strong><\/p>\n<p class=\"intro-text\">When specifying a full entity-attribute pair, the following standard syntax applies everywhere in Server and Explorer:<\/p>\n<p class=\"intro-text\"><span class=\"code-fragment\">EntityName<strong>[<\/strong>TemplateName<strong>]:<\/strong>AttributeName<strong>!<\/strong>AttributeValueName<\/span><\/p>\n<table>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong>[ ]<\/strong><\/td>\n<td><em>Template names<\/em> are enclosed in square brackets.<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong>:<\/strong><\/td>\n<td><em>Attribute names<\/em> are preceded with a colon.<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong>!<\/strong><\/td>\n<td><em>Attribute value names<\/em> are preceded with an exclamation mark.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"intro-text\">Remember that within calculations, the name must be enclosed within curly brackets:<\/p>\n<p class=\"intro-text\"><span class=\"code-fragment\"><strong>{<\/strong>EntityName<strong>[<\/strong>TemplateName<strong>]:<\/strong>AttributeName<strong>!<\/strong>AttributeValueName<strong>}<\/strong><\/span><\/p>\n<p class=\"intro-text\">Example:\u00a0<span class=\"code-fragment\"><strong>{<\/strong>Archer<strong>[<\/strong>Oil Producing Well<strong>]:<\/strong>Status!Actual<strong>}<\/strong><\/span><\/p>\n<h2 class=\"page-subheading\">Data Type<\/h2>\n<p class=\"intro-text\">All function parameters, results, and context variables are strongly-typed values, meaning they represent a value of a specific <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/data-types\/\">data type<\/a>. The type indicates what operations are allowed to be performed on a value. The available data\u00a0types are:<\/p>\n<table style=\"width: 100%;\">\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px; width: 15.2797%;\"><span style=\"color: #000000;\"><b>Data\u00a0Type<\/b><\/span><\/td>\n<td style=\"padding-left: 5px; width: 64.8022%;\"><span style=\"color: #000000;\"><b>Options\/Format\/Usage<\/b><\/span><\/td>\n<td style=\"padding-left: 5px; width: 19.9181%;\"><span style=\"color: #000000;\"><b>Example<\/b><\/span><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px; width: 15.2797%;\">Boolean<\/td>\n<td style=\"padding-left: 5px; width: 64.8022%;\">The options are: true, false<\/td>\n<td style=\"padding-left: 5px; width: 19.9181%;\">\u00a0true<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px; width: 15.2797%;\">DateTime<\/td>\n<td style=\"padding-left: 5px; width: 64.8022%;\">\n<p>The following formats are accepted:<\/p>\n<p>{utc'yyyy-MM-dd'}<br \/>\n{utc'yyyy-MM-dd HH:mm'}<br \/>\n{utc'yyyy-MM-dd HH:mm:ss'}<br \/>\n{utc'yyyy-MM-dd HH:mm:ss.fff'}<\/p>\n<p>The \"utc\" prefix must be used in all cases.<\/p>\n<\/td>\n<td style=\"padding-left: 5px; width: 19.9181%;\">\n<p>{utc'2016-02-17 16:52'}<\/p>\n<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px; width: 15.2797%;\">Decimal<\/td>\n<td style=\"padding-left: 5px; width: 64.8022%;\">[+|-][digits][.[digits]]<br \/>\nThere must always be a decimal point and at least 1 decimal place specified.\u00a0<\/td>\n<td style=\"padding-left: 5px; width: 19.9181%;\">-1.2<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px; width: 15.2797%;\">Duration<\/td>\n<td style=\"padding-left: 5px; width: 64.8022%;\">\n<p>Duration format. The following formats are accepted:\u00a0<\/p>\n<p>{du'[-]hh:mm'}<br \/>\n{du'[-]hh:mm:ss'}<br \/>\n{du'[-]hh:mm:ss.fff'}<br \/>\n{du'D.HH:MM:SS'}<\/p>\n<p><strong>Note<\/strong>: Some functions (e.g. Sampling()) will accept duration expressed in other formats. This is described in the relevant function, where applicable. For most functions, however, this notation has changed from expressing duration in seconds. E.g. Previously, where sample interval was expressed as\u00a0sampleinterval=20, it is now expressed as\u00a0<strong>sampleInterval={du'00:00:20'}<\/strong>.<\/p>\n<\/td>\n<td style=\"padding-left: 5px; width: 19.9181%;\">\n<p>{du'01:00'}<\/p>\n<p>{du'-01:02:03'}<\/p>\n<p>{du'-01:02:03.456'}<\/p>\n<p>{du'5.12:30:00'}<\/p>\n<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px; width: 15.2797%;\">Error<\/td>\n<td style=\"padding-left: 5px; width: 64.8022%;\">\u00a0This cannot be written by the calculation author, but rather is passed to the function by the data itself.<\/td>\n<td style=\"padding-left: 5px; width: 19.9181%;\">\u00a0<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px; width: 15.2797%;\">Expression<\/td>\n<td style=\"padding-left: 5px; width: 64.8022%;\">Anything that can be parsed by the calculation engine, including tag names, mathematical expressions, and other calculations. <br \/>\n<strong>Note<\/strong>: This is not strictly a data type, but it returns one of the other data types listed here.<\/td>\n<td style=\"padding-left: 5px; width: 19.9181%;\">2+2<br \/>\ntagname<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px; width: 15.2797%;\">Integer<\/td>\n<td style=\"padding-left: 5px; width: 64.8022%;\">[+|-][digits]<br \/>\nMust not contain a decimal point.<\/td>\n<td style=\"padding-left: 5px; width: 19.9181%;\">1<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px; width: 15.2797%;\">Null<\/td>\n<td style=\"padding-left: 5px; width: 64.8022%;\">No value<\/td>\n<td style=\"padding-left: 5px; width: 19.9181%;\">\u00a0null<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px; width: 15.2797%;\">String<\/td>\n<td style=\"padding-left: 5px; width: 64.8022%;\">\n<p>There are 3 ways of expressing strings as they sometimes need to be nested. These are:<\/p>\n<ul>\n<li>Surrounded by (straight) quotation marks \" \"<\/li>\n<li>Surrounded by (straight) single quotes ' '\u00a0<\/li>\n<li>Str()<\/li>\n<\/ul>\n<p><strong>Note<\/strong>: Escape sequences are not supported.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>IMPORTANT<\/strong><\/span>: When copy-pasting examples, sometimes \" and ' may be substituted with curly quotes. In these cases, you will have to manually change them to straight quotes to get them to work in places such as the IFS OI Explorer trend.\u00a0<\/p>\n<\/td>\n<td style=\"padding-left: 5px; width: 19.9181%;\">\"my\u00a0string\"<br \/>\n'my string'<br \/>\nStr(my string)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 class=\"page-subheading\">Dimension<\/h2>\n<p class=\"intro-text\">An argument passed in to a function can be of the following types:<\/p>\n<table>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><span style=\"color: #000000;\"><b>Dimension<\/b><\/span><\/td>\n<td style=\"padding-left: 5px;\"><span style=\"color: #000000;\"><b>Definition<\/b><\/span><\/td>\n<td style=\"padding-left: 5px;\"><span style=\"color: #000000;\"><b>Example<\/b><\/span><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">Collection<\/td>\n<td style=\"padding-left: 5px;\">A collection of Variable Values. Usually fetched tag values are expressed this way.<\/td>\n<td style=\"padding-left: 5px;\">\u00a0<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">MultiCollection<\/td>\n<td style=\"padding-left: 5px;\">A list of Collections, which can be returned by DDxyz() functions.<\/td>\n<td style=\"padding-left: 5px;\">\u00a0<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">Error<\/td>\n<td style=\"padding-left: 5px;\">This means that the argument does not contain a value; rather the argument\u00a0itself is an error that is returned from the datasource. E.g. For\u00a0a tag fetch, it is possible that a historian will return 1, 2, error, 4. In the calculation engine,\u00a0this could be represented as a Collection which contains 4 data\u00a0types: 1 (Integer), 2 (Integer), (Error), 4 (Integer). However, if the tag doesn\u2019t exist at all then we won\u2019t get any values for it, and in this case an adaptor could return an Error dimension to indicate that the tag is completely missing.<\/td>\n<td style=\"padding-left: 5px;\">\u00a0<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">Expression<\/td>\n<td style=\"padding-left: 5px;\">Anything that can be parsed by the calculation engine, including tag names, mathematical expressions, and other calculations.<br \/>\n<strong>Note<\/strong>: This is not strictly a dimension, but it returns one of the other dimensions listed here.<\/td>\n<td style=\"padding-left: 5px;\">2 + 2<br \/>\n{tagname}<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">Matrix<\/td>\n<td style=\"padding-left: 5px;\">A group\u00a0of values in a tabular format, organized in rows and columns. Datasets are expressed this way.<\/td>\n<td style=\"padding-left: 5px;\">\u00a0<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">SingleValue<\/td>\n<td style=\"padding-left: 5px;\">The smallest discrete datum. Hardcoded values are usually expressed as a SingleValue. E.g. In the expression \"{myTag} + 5\", 5 would be parsed as a SingleValue which contains an Integer argument value type with a value of 5.<\/td>\n<td style=\"padding-left: 5px;\">\u00a0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 class=\"page-subheading\">Behaviour<\/h2>\n<p class=\"intro-text\">Arguments in a function call exhibit one of the following behaviours:<\/p>\n<table>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong>Behaviour<\/strong><\/td>\n<td style=\"padding-left: 5px;\"><strong>Definition<\/strong><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">Required<\/td>\n<td style=\"padding-left: 5px;\">The argument is mandatory. If not supplied, the function call will return an error.<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">Optional (0..1)<\/td>\n<td style=\"padding-left: 5px;\">The\u00a0argument is not mandatory. It may be left out of a function call, however a blank space is not acceptable and will produce an error. If supplied, only 1 value is acceptable.<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">Optional (0..n)<\/td>\n<td style=\"padding-left: 5px;\">An\u00a0argument is not mandatory. It may be left out of a function call, however a blank space is not acceptable and will produce an error. If supplied, 1 or more values are \u00a0acceptable, depending on the specification of the function.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 class=\"page-subheading\">Context Parameters<\/h2>\n<p class=\"intro-text\">A context parameter is a reserved parameter designed to allow a function to retrieve a certain type of data. Context parameters are so-called because the parameter available to a function depends on the function's context. E.g. The SampleMethod parameter is required for tag fetches but not for datasets.\u00a0<\/p>\n<p class=\"intro-text\">Context parameters in expressions can be accessed the following way: <strong>param[parameterName]<\/strong>.\u00a0<\/p>\n<p class=\"intro-text\">For example, you can go to IFS OI Explorer, create a new trend and add the following expression to it: <strong>Integer(param[sampleInterval])<\/strong><\/p>\n<p class=\"intro-text\">This will return the value of the sample interval parameter from the context (which is of type <em>duration<\/em>) and then convert it to an <em>integer<\/em> so that Explorer can trend it. In a default trend that has the sampleInterval of 1 day,\u00a0this expression would give you\u00a0a flat trend with a constant value of 86,400.<\/p>\n<h3>Tag Fetches<\/h3>\n<p class=\"intro-text\">These context parameters are supplied by the consuming application (e.g. IFS OI Explorer).<\/p>\n<table>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><b>Context Parameter<\/b><\/td>\n<td><b>Format\/Options<\/b><\/td>\n<td><b>To get the current value, use...<\/b><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">Start Time<\/td>\n<td>Specified as a DateTime\u00a0(see <a href=\"#Data_Type\">Data\u00a0Type<\/a> above)<\/td>\n<td>param[startTime]<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">End Time<\/td>\n<td>Specified as a DateTime\u00a0(see <a href=\"#Data_Type\">Data\u00a0Type<\/a> above)<\/td>\n<td>param[endTime]<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">Sample Method<\/td>\n<td>One of the following strings: Raw, Average, LastKnownValue, LinearInterpolate<\/td>\n<td>param[sampleMethod]<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">Sample Interval<\/td>\n<td>Specified as a duration (see <a href=\"#Data_Type\">Data\u00a0Type<\/a> above)<\/td>\n<td>param[sampleInterval]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Dataset\u00a0Fetches<\/h3>\n<p class=\"intro-text\">The context parameters available to dataset fetches depend on the query being used to create the dataset. You can usually find these parameters when adding a dataset in IFS OI Explorer.<\/p>\n<h3>Overriding Context Parameters<\/h3>\n<p class=\"intro-text\">You can override context parameters in the following ways:<\/p>\n<table>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><b>Override using...<\/b><\/td>\n<td><span style=\"color: #000000;\"><b>Description<\/b><\/span><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/sampling\/\">Sampling<\/a>()<\/td>\n<td>This function is a shortcut that allows you to override only the sampleMethod and sampleInterval context parameters. <br \/>\nE.g. \u00a0<span class=\"code-fragment\">Sampling(\u2026, \"LastKnownValue\", {du'01:00'})<\/span><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">{ }<\/td>\n<td>The custom {} syntax allows you to override any context parameter and to add new ones, but these context parameters will always apply only to the tag that is being fetched. See above for details on how to use this. For example, this will make a single-point fetch: <br \/>\n<span class=\"code-fragment\">{myTag, startTime = param[endTime]}<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<hr \/>\n<h2 class=\"page-subheading\">Changes from version 2.6<\/h2>\n<p class=\"intro-text\">Some changes have been made from v 2.6 to standardise and simplify the functions and keywords.\u00a0<\/p>\n<h3>Renamed Functions and Keywords<\/h3>\n<table>\n<thead>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\"><strong>In v2.6:<\/strong><\/td>\n<td width=\"441\"><strong>Renamed in\u00a0v4 to:<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">ACCUM()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/sum_sampled\/\">Sum_Sampled<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">AVG()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/average\/\">Average<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">HIST_AVERAGE()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/average_sampled\/\">Average_Sampled<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">HIST_CONTINUOUSMAX()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/continuousmax_sampled\/\">ContinuousMax_Sampled<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">Hist_ContinuousMin()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/continuousmin_sampled\/\">ContinuousMin_Sampled<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">HIST_MAX()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/max_sampled\/\">Max_Sampled<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">HIST_Min()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/min_sampled\/\">Min_Sampled<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">HIST_TIMEWEIGHTEDAVERAGE()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/timeweightedaverage_sampled\/\">TimeWeightedAverage_Sampled<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">INTEGRAL()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/integral_sampled\/\">Integral_Sampled<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">NUMSAMPLES()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/count_sampled\/\">Count_Sampled<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">VALUEAT()<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/valueat_sampled\/\">ValueAt_Sampled<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">TIME<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/time\/\">Time<\/a>()<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"178\">THIS<\/td>\n<td width=\"441\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/keywords\/\">Entity<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Deprecated Functions<\/h3>\n<table>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong>2.6<\/strong><\/td>\n<td style=\"padding-left: 5px;\"><strong>From v4.3.2, use this:<\/strong><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">MOD<\/td>\n<td class=\"intro-text\" style=\"padding-left: 5px;\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/operators\/\">%<\/a><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">POWER<\/td>\n<td class=\"intro-text\" style=\"padding-left: 5px;\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/operators\/\">**<\/a><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">TAG()<br \/>\nTAGNAME<br \/>\nTAGNAME[]<br \/>\nENTITY()<\/td>\n<td class=\"intro-text\" style=\"padding-left: 5px;\">\n<p><a href=\"#Tag_Syntax\">{ }<\/a>\u00a0<\/p>\n<p>(See <a href=\"#Tag_Syntax\">Tag Syntax<\/a> above)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Deprecated Keywords<\/h3>\n<table>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong>2.6<\/strong><\/td>\n<td style=\"padding-left: 5px;\"><strong>Note<\/strong><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">EP_ATTRIBUTENAME<\/td>\n<td style=\"padding-left: 5px;\">N\/A (this is now obsolete - underlying value is already resolved)<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">EP_PROPERTY<\/td>\n<td style=\"padding-left: 5px;\">N\/A (this is now obsolete - underlying value is already resolved)<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">EP_TEMPLATE<\/td>\n<td style=\"padding-left: 5px;\">\u00a0<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">EP_SESSIONVAR<\/td>\n<td style=\"padding-left: 5px;\">\u00a0<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\">EP_USERVAR<\/td>\n<td style=\"padding-left: 5px;\">\u00a0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 class=\"page-subheading\">Release History<\/h2>\n<ul class=\"intro-text\">\n<li>Calculation Overview and Syntax 4.6.5\n<ul class=\"intro-text\">\n<li>Added \"MultiCollection\" to the list of Dimensions.<\/li>\n<\/ul>\n<\/li>\n<li>Calculation Overview and Syntax 4.0\n<ul class=\"intro-text\">\n<li>Initial version<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This page describes the general rules for syntax and how to use the functions in the calculation engine.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/calculation-syntax\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":9490,"parent":3650,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[100,356],"class_list":["post-9383","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-calculations","tag-syntax","Version-4-0","Version-4-6-5","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/9383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=9383"}],"version-history":[{"count":8,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/9383\/revisions"}],"predecessor-version":[{"id":71878,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/9383\/revisions\/71878"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/9490"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=9383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=9383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=9383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}