Function Handbook
Operator
The AND function returns TRUE only if all specified conditions evaluate to TRUE. If any condition evaluates to FALSE, the entire function returns FALSE. Typically, AND is used to test multiple conditions within other logical functions
(<expression1>) AND (<expression2>)
Description:
- expression1 - First test condition that evaluates to TRUE or FALSE.
- expression2 - Second test condition that evaluates to TRUE or FALSE.
F.IF (A > 0 AND B=5, B, 0)
Returns B if A is greater than 0 and B equals 5; otherwise returns 0.
The IF function returns one value if a specified condition evaluates to TRUE, and another value if it evaluates to FALSE.
F.IF(bool <expression1>, float <expression2>, float <expression3>)
- expression1 - Logical expression
- expression2 - Value returned if the condition evaluates to TRUE
- expression3 - Value returned if the condition evaluates to FALSE.
F.IF (A > 0, B, 0)
Returns B if A is greater than 0, or 0 if A is less than or equal to 0.
F.IF (((A / B) > 1.5) and ((A / B) < 2.3), C, 0)
Returns C if A/B is greater than 1.5 AND less than 2.3, or 0 if A/B is less than or equal to 1.5 OR greater than or equal to 2.3.
The LIKE operator is applicable only to string values in a catalog. It is used to find substrings within these values and to apply filters when searching for specific entries in a catalog. It is not supported in calculated fields of a Base Indicator (where "=" is used instead).
<'Catalog code'> LIKE <'Pattern'>
-
Catalog code – The code/identifier of the catalog.
-
Pattern – A substring, part of a word, or phrase to match.
F.SUM(A, 20110101, 20111231, rep.everymonth, 'branch' LIKE 'Moscow*')
This formula searches for values in the "Branches" catalog (catalog code: 'branch') that begin with the word "Moscow".
The NOT operator negates a condition.
NOT (<Condition_Operator>)
- Condition_Operator – The argument representing the condition or operator to be negated.
F.SUM(A, 20110101, 20111231, rep.everymonth, 'branch' NOT LIKE 'Moscow*')
Searches for all values except those matching 'Moscow*' in the "Branches" catalog (catalog code: 'branch').
NOT (A=8)
A is not equal to 8.
The NOT LIKE operator, the inverse of the LIKE operator, is applicable only to string values in a catalog. It is used to exclude entries that contain a specific substring. This operator applies filters within a catalog to find the desired values. It is not supported in calculated fields of a Base Indicator (where "<>" or "!=" is used instead).
<'Catalog code'> NOT LIKE <'Pattern'>
-
Catalog code – The code/identifier of the catalog.
-
Pattern – A substring, part of a word, or phrase to match.
F.SUM(A, 20110101, 20111231, rep.everymonth, 'branch' NOT LIKE 'Moscow*')
This formula searches for values in the "Branches" catalog (catalog code: 'branch') that do not begin with the word "Moscow".
The OR logical operator evaluates a specified condition and, depending on the result, performs the appropriate action. It returns TRUE if at least one of the arguments evaluates to TRUE, and FALSE if all arguments evaluate to FALSE.
Typically, the OR function is used to extend the capabilities of other functions that perform logical checks.
(<expression1>) OR (<expression2>)
F.IF (A > 0 OR B=5, B, 0)
Mathematical functions
The F.ARCCOS function returns the arccosine of an angle.
F.ARCCOS (float <value>)
- value – an indicator or an expression for which to calculate the arccosine.
F.ARCCOS (1)
Returns the value of 0.
The F.ABC function returns the modulus (absolute value) of a number, i.e., the number without its sign.
F.ABC(float <expression>)
- expression — A real number whose absolute value is to be found.
F.ABC (3)
Returns the value of 3.
F.ABC (-2)
Returns the value of 2.
The F.ARCCTG function returns the arccotangent of an angle.
F.ARCCTG (float <value>)
- value – an indicator or an expression for which to calculate the arccotangent.
F.ARCCTG (1)
Returns the value 45°
The F.ARCSIN function returns the arcsine of an angle.
F.ARCSIN (float <value>)
- value – an indicator or an expression for which to calculate the arcsine.
F.ARCSIN (1)
Returns the value 90°
The F.ARCTG function returns the arctangent of an angle.
F.ARCTG (float <value>)
- value – an indicator or an expression for which to calculate the arctangent.
F.ARCTG (1)
Returns the value 45°
The function F.COS returns the cosine of an angle.
F.COS (float <angle>)
- angle – an indicator or an expression for which to calculate the cosine.
F.COS(360)
Returns the value of 1.
The F.COUNTFROMSEP function returns the number of significant digits after the decimal separator in a number.
F.COUNTFROMSEP (float <expression>)
- expression – any syntactically valid expression that results in a real value.
F.COUNTFROMSEP(123.1567)
Returns the value of 4.
The F.CTG function returns the cotangent of an angle.
F.CTG(float <angle>)
- angle – an indicator or an expression for which to calculate the cotangent.
F.CTG (45)
Returns the value of 1.
The F.EXP function returns the base of the natural logarithm (e = 2.7182818284590452...) raised to the specified power.
F.EXP(float <expression>)
- expression – an indicator or expression for which to calculate the exponent.
F.EXP (0)
Returns the value of 1.
The F.FLOOR function rounds a number down to the nearest multiple of a specified significance.
F.FLOOR(float <expression>, float <precision>)
- expression – variable code or expression
- precision – the number of digits (multiple) to which the value is rounded down
F.FLOOR(2.5, 1)
Returns the value 2, rounded down to the nearest multiple of 1.
F.FLOOR(-2.5, -2)
Returns thevalue -2, rounded down to the nearest multiple of -2.
F.FLOOR(-2.5, 2)
Returns an error because the numbers -2.5 and 2 have different signs.
F.FLOOR(1.5, 0.1)
Returns the value 1.5, rounded down to the nearest multiple of 0.1.
F.FLOOR(0.234, 0.01)
Returns the value 0.23, rounded down to the nearest multiple of 0.01.
The F.LG function returns the base-10 logarithm of a specified number.
F.LG (float <expression>)
- expression – an indicator or an expression for which to calculate the base-10 logarithm.
F.LG (10)
Returns the value of 1.
The F.LN function returns the natural logarithm of a specified number.
F.LN (float <expression>)
- expression – an indicator or an expression for which to calculate the natural logarithm.
F.LN (1)
Returns the value of 0.
The F.MAX function returns the largest value from a set of values.
F.MAX(float <expression1>, ..., float <expressionN>)
- expression1, ..., expressionN - real numbers from which the maximum value is to be found.
F.MAX (2, 3, 1)
Returns the value of 3.
The F.MAXIMUM function calculates the maximum value over a period in a specified period step or the maximum value in an array.
When calculating the value over a period, the function first aggregates (sums) the data within the specified period step and then finds the extremum (maximum) within the assigned date range.
F.MAXIMUM(<indicator>, int <start date>, int <end date>, REP.EVERY*, {<filter>}, {bool <expression>})
F.MAXIMUM([<expression>{,<expression>}])
- indicator - variable code
- start date - date from which the calculation starts
- end date - date until which the calculation is performed
- REP.EVERY* - constant corresponding to the period step
- optional filter for catalogs
- expression – any syntactically valid expression that evaluates to a number
F.MAXIMUM(A, 20140101, 20141231, rep.everymonth)
Returns the maximum monthly value for the year 2014.
F.MAXIMUM(A, 20140101, 20141231, rep.everymonth, 'Segment' LIKE 'Small*')
Returns the maximum monthly value of the selected indicator for 2014 with the value "Small" in the "Segment" catalog.
F.MAXIMUM([2, 4])
Returns the maximum value in the array - 4.
The F.MAXTAB function calculates the maximum value of an indicator split by a catalog.
F.MAXTAB (<indicator>, '<catalog code>')
-
indicator - an indicator variable whose maximum value is to be found.
-
catalog code - the code of the catalog used to split the data when calculating the indicator’s maximum value.
F.MAXTAB(A, 'Employee')
The indicator corresponding to variable A is split by the "Employee" catalog, and from the resulting list of <Catalog value>=<Indicator value>, the maximum indicator value is returned.
The F.MIN function returns the smallest value from a set of values.
F.MIN(float <expression1>, ..., float <expressionN>)
- expression1, ..., expressionN - real numbers from which the minimum value is to be found.
F.MIN (2, 3, 5)
Returns the value of 2.
The F.MINIMUM function calculates the minimum value over a period at a specified period step or the minimum value in an array.
When calculating the value over a period, the function first aggregates (sums) the data within the specified period step and then finds the extremum (minimum) within the assigned date range.
F.MINIMUM(<indicator>, int <start date>, int <end date>, REP.EVERY*, {<filter>}, {bool <expression>})
F.MINIMUM([<expression>{, <expression>}])
- indicator - variable code
- start date - date from which the calculation starts
- end date - date until which the calculation is performed
- REP.EVERY* - constant corresponding to the period step
- optional filter for catalogs
- expression - any syntactically valid expression that evaluates to a number
F.MINIMUM(A, 20140101, 20141231, rep.everymonth)
Returns the minimum monthly value for the year 2014.
F.MINIMUM(A, 20140101, 20141231, rep.everymonth, 'Segment' LIKE 'Small*')
Returns the minimum monthly value of the selected indicator for 2014 with the value "Small" in the "Segment" catalog.
F.MINIMUM([2, 4])
Returns the minimum value in the array — 2.
The F.MINTAB function calculates the minimum value of an indicator split by a catalog.
F.MINTAB (<indicator>, '<catalog code>')
- metric - an indicator variable whose minimum value is to be found.
- catalog code - the code of the catalog used to split the data when calculating the indicator’s minimum value.
F.MINTAB(A, 'Employee')
The indicator corresponding to variable A is split by the "Employee" catalog, and from the resulting list of <Catalog value>=<Indicator value>, the minimum metric value is returned.
The F.NUMFROMSEP function returns the number after the decimal separator from a given number.
F.NUMFROMSEP (float <expression>)
- expression – any syntactically valid expression that results in a real value.
F.NUMFROMSEP (123.4567)
Returns the value of 4567.
The F.PI function returns the mathematical constant Pi (π) - approximately 3.1415...
F.PI
F.PI
For an indicator with measurement accuracy to two decimal places, returns 3.14
The F.ROUND function rounds a value to a specified precision. If the precision is a negative number, it rounds the number of digits in the integer part.
F.ROUND(float <expression>, int <precision>)
- expression – variable code or expression
- precision – number of decimal places to round to (if precision is a negative number, it rounds the number of digits in the integer part)
F.ROUND(123.9994, 3)
Returns the value of 123
F.ROUND(123.9995, 3)
Returns the value of 124
F.ROUND(748.58, -1)
Returns the value of 750.00
F.ROUND(748.58, -3)
Returns the value of 1000
The F.ROUNDDOWN function rounds a value down to the nearest value that is smaller in absolute terms.
F.ROUNDDOWN(float <expression>, int <precision>)
- expression – variable code or expression
- precision – number of decimal places after rounding
F.ROUNDDOWN(3.14159, 3)
Returns the value 3.141, rounded down to three decimal places.
F.ROUNDDOWN(76.9, 0)
Returns the value 76, rounded down to the nearest integer.
F.ROUNDDOWN(-3.14159, 1)
Returns the value -3.1, rounded down to one decimal place.
F.ROUNDDOWN(31415.92654, -2)
Returns the value 31400, rounded down to two decimal places to the left of the decimal point.
The F.ROUNDUP function rounds a value up to the nearest value that is larger in absolute terms.
F.ROUNDUP(float <expression>, int <precision>)
- expression – variable code or expression
- precision – number of digits to which the value is rounded
F.ROUNDUP(3.14159, 3)
Returns the value 3.142, rounded up to three decimal places.
F.ROUNDUP(76.1, 0)
Returns the value 77, rounded up to the nearest integer.
F.ROUNDUP(-3.14159, 1)
Returns the value -3.2, rounded up to one decimal place.
F.ROUNDUP(31415.92654, -2)
Returns the value 31500, rounded up to two decimal places to the left of the decimal point.
The F.SIN function returns the sine of an angle
F.SIN(float <angle>)
- angle – a numeric value or expression to compute the sine
F.SIN(30)
Returns 0.5
The F.SQRT function calculates the square root of a specified expression or indicator value.
F.SQRT(float <expression>)
- expression – a variable code or expression.
F.SQRT(A)
Returns the square root of the indicator value.
F.SQRT(64)
Returns the value 8.
The F.TG function returns the tangent of an angle.
F.TG (float <angle>)
- angle – an indicator or an expression for which to calculate the tangent.
F. TG (45)
Returns the value of 1.
Date-related functions
The F.DATE function returns a date in the format (day, month, year), with the capability to calculate any of these parameters using other functions.
F.DATE (int <day>, int <month>, int <year>)
F.DATE(1,1,2015)
Returns the value 20150101, i.e., 01.01.2015.
F.SUM(A, F.DATE(01, 01, F.YEAR(F.REPORTDATE(rep.byreport))), F.TODAY(0, rep.byend), rep.everyquarter)
Using the F.DATE function, the start date for summation is set to January 1 of each year, where the year is calculated using the F.REPORTDATE function.
The F.DATEADD function returns a date with a specified offset.
F.DATEADD(int <start date>, int <offset>, REP.EVERY*, {REP.BYSTART | REP.BYEND | REP.BYREPORT})
- start date - the date from which the calculation starts
- offset - the number of period steps to offset
- REP.EVERY* - the constant corresponding to the period step
- optional parameter returning the date value at the beginning (REP.BYSTART), end (REP.BYEND), or reporting period (REP.BYREPORT) of the period (default is REP.BYEND)
F.DATEADD(F.REPORTDATE(rep.byend), -11, rep.everyquarter, rep.bystart), F.DATEADD(F.REPORTDATE(rep.byend), -4, rep.everyquarter, rep.byend)
This function defines the calculation period.
The start and end dates of the calculation period are set with an offset from the end date of the Indicator's reporting period. For an Indicator with a "Quarter" step and a reporting period from Q1 2014 to Q2 2014, the calculation period will be 2 years — Q1 2012 to Q2 2013.
F.AVG(A, 4, F.DATEADD(F.REPORTDATE(rep.byend), -11, rep.everyquarter, rep.bystart), F.DATEADD(F.REPORTDATE(rep.byend), -4, rep.everyquarter, rep.byend), rep.everyquarter, 4)
This function calculates the quarterly average value of variable "A".
The F.DATEADD function (described above) is used to compute the calculation period for the average. The average value calculated for 2012–2013 will be displayed in 2014.
The F.DATEDIFF function returns the difference between two dates in a specified period step. The result is an integer.
F.DATEDIFF(REP.EVERY*, int <start date>, int <end date>)
- REP.EVERY* - the constant corresponding to the period step
- start date - the date from which the calculation starts
- end date - the date until which the calculation is performed
F.DATEDIFF(rep.everymonth, 20100101, 20101231)
Returns 11 months.
The F.DATENIL function returns the minimum (empty) date value.
F.DATENIL()
F.DATENIL
Returns 18991230 - the minimum date value 30.12.1899.
The F.DATEONLY function returns only the date part from a specified value (without the time component).
F.DATEONLY(int <date>)
- date - a date with time from which the date part is extracted.
F.DATEONLY(F.GETDATE)
Returns the current date value without time.
The F.DAY function extracts the day from a date parameter.
F.DAY(int <date>, REP.EVERY*)
- date - the date from which the day is extracted
- REP.EVERY* - the constant corresponding to the period step
F.DAY(20151101)
Returns the value: 1.
The F.GETDATE function returns the current date and time.
F.GETDATE()
F.GETDATE
Returns the current date and time.
The F.HOUR function returns the hour value from a date.
F.HOUR(int <date>)
- date - a date with time from which the hour is extracted.
F.HOUR(F.GETDATE())
Returns the hour from the current date and time.
The F.MINUTE function returns the minute value from a date.
F.MINUTE(int <date>)
- date - a date with time from which the minute is extracted.
F.MINUTE(F.GETDATE())
Returns the minutes from the current date and time.
The F.MONTH function extracts the month from a date parameter.
F.MONTH(int <date>)
- date - the date from which the month is extracted.
F.MONTH(20151101)
Returns the value: 11.
The F.PERIOD function returns the difference between two dates in a specified period step.
F.PERIOD(int <start date>, int <end date>, REP.EVERY*)
- start date - the date from which the calculation starts
- end date - the date until which the calculation is performed
- REP.EVERY* - the constant corresponding to the period step
F.PERIOD(20150101, 20150201, rep.everyday)
Returns 31 days
F.PERIOD(20150101, 20150201, rep.everyhour)
Returns 744 hours
F.PERIOD(20140101, 20150101, rep.everymonth)
Returns 12 months
The F.PERIODOF function returns the difference between the start and end of the current calculated reporting period step.
F.PERIODOF(REP.EVERY*)
- REP.EVERY* – the constant corresponding to the period step.
F.PERIODOF(rep.everyday)
When calculating the indicator for the period from January to December 2014 with a "Month" step, it will sequentially return: 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
The same function with a "Quarter" period step will return: 90, 91, 92, 92
This is equivalent to the combination of functions: F.PERIOD(F.TODAY(0, rep.bystart), F.TODAY(0, rep.byend), rep.everyday) + 1
The F.QUARTER function extracts the quarter from a date parameter.
F.QUARTER(int <date>)
- date - the date from which the quarter is extracted.
F.QUARTER(20151101)
Returns the value: 4
The F.REPORTDATE function returns the current report start date, current report end date, or the date of the current period step.
F.REPORTDATE({REP.BYSTART | REP.BYEND | REP.BYREPORT})
REP.BYSTART | REP.BYEND | REP.BYREPORT — A parameter that determines the returned date value to the start of the reporting period, end of the reporting period or date of the current period step
F.SUM(A, F.REPORTDATE(rep.bystart), F.TODAY(0, rep.byend), rep.everymonth)
The total for the period from January to December 2014 will be calculated on a monthly cumulative basis up to the current report column (January returns the value for January, February returns (January + February), March returns (January + February + March), and so on).
F.REPORTDATE(rep.bystart)
Returns the report start date.
The F.SECOND function returns the seconds value from a date.
F.SECOND(int <date>)
- date - a date with time from which the seconds are extracted.
F.SECOND(F.GETDATE())
Returns the seconds from the current date and time.
The F.TODAY function returns the current date (or a date offset from the current date).
F.TODAY({int <offset>, {REP.BYCURRENT | REP.BYSTART | REP.BYEND}})
- offset - Number of reporting period steps to offset
- date mode (optional) - Specifies date interpretation REP.BYCURRENT | REP.BYSTART | REP.BYEND (Default: REP.BYEND). If date mode is unspecified, REP.BYCURRENT is used.
F.TODAY
Returns the current date - 20150305 00:00:00.000
F.TODAY(-1)
If reporting period step = month: Returns current date minus 1 month
If reporting period step = quarter: Returns current date minus 1 quarter
F.TODAY(+2)
If reporting period step = month: Returns current date plus 2 months
F.TODAY(0, rep.bystart)
For monthly reporting period: When calculating November metrics, returns start of November – 20141101 00:00:00.000
F.IF(F.TODAY = 20141225, 'Christmas', '')
This function checks the current date and returns "Christmas" if it equals December 25, 2014; otherwise returns an empty string.
The F.YEAR function extracts the year from a date parameter.
F.YEAR(int <date>)
- date - the date from which the year is extracted.
F.YEAR(20151101)
Returns the value: 2015
String manipulation functions
The F.STRFMTTMPL function pads a string (parameter 2) with characters to match a specified format template form a string in the specified format (parameter 1).
This function is used exclusively in the Import Script Configuration Wizard.
F.STRFMTTMPL(string <expression1>, string <expression2>)
- expression1 - string template defining the target format
- expression2 - string to be transformed into the specified format
The following characters cannot be used: %, _ , [ ] , ^
F.STRFMTTMPL('00000', '123')
Returns the value '00123'
The F.STRINDEXOF function returns the starting index of a search string (parameter 1) within a target string (parameter 2). String indexing starts at 1.
F.STRINDEXOF(string <expression1>, string <expression2>)
- expression1 - search string
- expression2 - string in which the search is performed
The following characters must not be used in any expressions: %, _ , [ ] , ^
F.STRINDEXOF('(', '10 (100%)')
Returns 4
The F.STRUBSTR function returns the substring of a string (parameter 1) up to the specified string (parameter 2).
This function is exclusively used within the Import Script Setup Wizard.
F.STRUBSTR(string <expression1>, string <expression2>)
- expression1 - the string up to which the extraction is performed
- expression2 - the string from which the extraction is performed
The following characters cannot be used: %, _ , [ ] , ^
F.STRUBSTR( ',', 'Tyumen, Lenina str. 100' )
Returns the value Tyumen.
The F.SUBSTR function returns a substring contained within a string (parameter 1) starting from a specified position (parameter 2) with a given length (parameter 3).
F.SUBSTR(string <expression1>, int <expression2>, int <expression3>)
- expression1 - the string from which a substring will be extracted
- expression2 - the starting position from which to extract the substring
- expression3 - the length of the substring to be obtained
The following characters cannot be used: %, _ , [ ] , ^
F.SUBSTR('10 (100%)', 5, 3)
Returns the value 100.
F.SUBSTR('Pushkin Aleksandr Sergeevich', 0, f.strindexof( ' ', Pushkin Aleksandr Sergeevich))
Returns the value 'Pushkin'.
The F.SUBSTRBETW function returns a substring contained within a string (parameter 1) between a string (parameter 2) and a string (parameter 3).
This function is used exclusively in the Import Script Configuration Wizard.
F.SUBSTRBETW(string <expression1>, string <expression2>, string <expression3>)
- expression1 - the string from which the substring is extracted
- expression2 - the starting delimiter string (extraction begins after this string)
- expression3 - the ending delimiter string (extraction ends before this string)
The following characters cannot be used: %, _ , [ ] , ^
F.SUBSTRBETW(',', ',', 'Tyumen, Lenina str. 100, apt. 99')
Returns the value 'Lenina str. 100'
F.SUBSTRBETW('ATM', ',', 'ATM2345, Branch №1')
Returns the value '2345'
The F.DATESTR function returns the string representation of a date
F.DATESTR(int <date>, REP.EVERY*)
- date - date value to convert to string format
- REP.EVERY* - constant for the corresponding period step (defaults to the reporting period step if not specified).
F.DATESTR(20141231, rep.everysecond)
returns '2014.12.31 00:00:00'
F.DATESTR(20141231, rep.everyminute)
returns '2014.12.31 00:00'
F.DATESTR(20141231, rep.everyhour)
returns '2014.12.31 00:00'
F.DATESTR(20141231, rep.everyday)
returns '2014.12.31'
F.DATESTR(20141231, rep.everyweek)
returns '2014 53 нед'
F.DATESTR(20141231, rep.everymonth)
returns '2014.12'
F.DATESTR(20111231, rep.everyquarter) -- '2011 04 кв'
returns '2014.12'
F.DATESTR(20111231, rep.everyhalf)
returns '2011 02 пе'
F.DATESTR(20111231, rep.everyyear)
returns '2011'
Application Example
Consider metric A with 12 values from the "Period" catalog for 2011 (from "2011.01; 2011 Q1" to "2011.12; 2011 Q4").
Suppose this metric's data was entered in April but tagged in the "Period" catalog as February data.
To reflect the metric’s previous-period inflow, use this formula for a calculated metric:
F.SUM(A, F.REPORTDATE(rep.bystart), F.REPORTDATE(rep.byend), rep.byreport, 'Period' like ('' + F.DATESTR(F.DATEADD(F.TODAY(0, rep.byend), -2, F.REPORTSTEP, rep.byend), F.REPORTSTEP) + ''))
Monthly Calculation
When aggregating by month for 2011:
F.SUM(A, 20110101, 20111231, rep.everymonth, 'Period' like '2010.11')
→ Returns data for 2011.01.01 - 2011.01.31
F.TODAY(0, rep.byend) → 2011.01.31
F.DATEADD(2011.01.31, -2, rep.everymonth, rep.byend) → Subtracts 2 months (aligns to month-end): 2010.11.30
F.DATESTR(2010.11.30, rep.everymonth) → ‘2010.11’
F.SUM(A, 20110101, 20111231, rep.everymonth, 'Period' like '2010.12')
→ Returns data for 2011.02.01 - 2011.02.28
F.TODAY(0, rep.byend) → 2011.02.28
F.DATEADD(2011.02.28, -2, rep.everymonth, rep.byend) → 2010.12.31
F.DATESTR(2010.12.31, rep.everymonth) → ‘2010.12’
F.SUM(A, 20110101, 20111231, rep.everymonth, 'Period' like '2011.01')
→ Returns data for 2011.03.01 - 2011.03.31
F.SUM(A, 20110101, 20111231, rep.everymonth, 'Period' like '2011.10')
→ Returns data for 2011.12.01 - 2011.12.31
Quarterly Calculation
When aggregating by quarter for 2011:
F.SUM(A, 20110101, 20111231, rep.everyquarter, 'Period' like '2010 Q3')
→ Returns data for 2011.01.01 - 2011.03.31
F.TODAY(0, rep.byend) → 2011.03.31
F.DATEADD(2011.03.31, -2, rep.everyquarter, rep.byend) → Subtracts 2 quarters (aligns to quarter-end): 2010.09.30
F.DATESTR(2010.09.30, rep.everyquarter) → '2010 Q3'
F.SUM(A, 20110101, 20111231, rep.everyquarter, 'Period' like '2010 Q4')
→ Returns data for 2011.04.01 - 2011.06.30
F.TODAY(0, rep.byend) → 2011.06.30
F.DATEADD(2011.06.30, -2, rep.everyquarter, rep.byend) → 2010.12.31
F.DATESTR(2010.12.31, rep.everyquarter) '2010 Q4'
F.SUM(A, 20110101, 20111231, rep.everyquarter, 'Period' like '2011 Q1')
Returns data for 2011.01.01 - 2011.03.31
F.SUM(A, 20110101, 20111231, rep.everyquarter, 'Period' like '2011 Q2')
Returns data for 2011.04.01 - 2011.06.30
Functions for calculating indicator values
The F.ANALITCOUNT function returns the number of catalog values for an indicator.
The F.ANALITCOUNTBASE function returns the number of catalog values in a base indicator.
Limitations of F.ANALITCOUNTBASE:
-
When using this function, the formula must not contain any other functions.
-
The calculated indicator can only include one variable, which must be a base indicator.
-
The variable of this function is not calculated separately (it appears in the calculation plan but without data).
F.ANALITCOUNT(<indicator>, <catalog>), F.ANALITCOUNTBASE(<indicator>, <catalog>)
- indicator - variable code
- catalog - code of the catalog for which the number of values is counted in the indicator's data
F.ANALITCOUNT(A, 'Employees')
Returns the number of employees for the indicator "A" during the reporting period.
Function F.AVG calculates the average value of a variable over a period within the period step (sum over the period divided by the number of values in that period)
F.AVG(<parameter>)
or
F.AVG(<parameter>, int <start date>, int <end date>, REP.EVERY*)
- parameter - variable code or expression.
- start date and end date - any syntactically valid expression returning the start/end dates of the calculation period.
- REP.EVERY* - constant corresponding to the period step (default: the report’s period step).
F.AVG(A) or F.AVG(A, F.ToDay(0, rep.bystart), F.ToDay(0, rep.byend), F.ReportStep( A ))
Returns the average value for the current period (sum over the current period divided by the number of values in that period).
Equivalent to F.SUM(А) / F.Count(А)
The F.AVGPERIOD function calculates the average value of a variable over a period (the sum from the initial period to the current period, divided by the number of periods).
F.AVGPERIOD(<indicator>, {int <offset>,)
or
F.AVGPERIOD(<indicator>, {int <offset>, {int <start date>, int <end date>, REP.EVERY, {int <period date offset>}, {<filter>}, {bool <expression*>} } })
- indicator - variable code or expression
- offset - variable period offset for calculation
- start date - date from which the calculation starts (default: reporting period)
- end date - date until which the calculation is performed (default: reporting period)
- REP.EVERY* - constant corresponding to the period step (default: reporting period step)
- period date offset - number of period steps to shift the average calculation data in time (default: 0)
- optional filter for catalogs
F.AVGPERIOD(A) or F.AVGPERIOD(A, 1)
Returns the sum from the initial period to the current period, divided by the number of periods.
F.AVGPERIOD(A, 2)
Returns the sum and period number, which increment every second reporting period. For example, if the period is a year with a "Month" reporting step:
For the first month: Sum for the first month / 1
For the second month: Sum for the second month / 1
For the third month: (Sum for the first + third month) / 2
For the fourth month: (Sum for the second + fourth month) / 2
For the fifth month: (Sum for the first + third + fifth month) / 3
For the sixth month: (Sum for the second + fourth + sixth month) / 3
And so on.
F.AVGPERIOD(A, 12)
With reporting parameters set to a "Month" period step over a 2-year period, the average value will be calculated year-over-year for each month:
For the first month of the first year: January 2010 / 1
For the first month of the second year: (January 2010 + January 2011) / 2
For the second month of the first year: February 2010 / 1
For the second month of the second year: (February 2010 + February 2011) / 2
F.AVGPERIOD(A, 12, 20130101, 20141231, rep.everymonth, 12)
This function calculates the monthly average of variable "A" over the two specified years (2013 and 2014). The result for the 13th and 14th years will be displayed in the 15th year. For 2014, the average value will equal the value for 2013.
F.AVGPERIOD(A, 0, F.TODAY(0, rep.bystart), F.TODAY(0, rep.byend), rep.everymonth)
This function calculates the monthly average of variable "A" for the current period. The calculation period is defined using the F.TODAY function (as described earlier).
For a "Quarter" period step: The monthly average will be computed for each quarter of the reporting period.
For a "Half-Year" period step: The monthly average will be computed for each half-year of the reporting period.
And so on.
F.AVGPERIOD(A, 0, F.TODAY(0, rep.bystart), F.TODAY(0, rep.byend), rep.everyday)
This function calculates the average value for each month of variable "A" over the reporting period with a "Month" step.
F.AVGPERIOD(A, 4, F.DATE(1, 1, F.YEAR(F.REPORTDATE(rep.byend))-3), F.DATE(31, 12, F.YEAR(F.REPORTDATE(rep.byend))-1), rep.everyquarter, 4)
This function calculates the quarterly average for a metric with a "Quarter" step and a period from Q1 2015 to Q4 2015, based on the three preceding years:
A: Variable
4: Summation step offset for averaging. Only values aligned with the offset are summed (e.g., Q1 2012 + Q1 2013 + Q1 2014). The result is divided by the number of summation steps (here, 3 first quarters).
Start Date: F.DATE(1, 1, F.YEAR(F.REPORTDATE(rep.byend))-3) → January 1, 2012 (2015 - 3).
End Date: F.DATE(31, 12, F.YEAR(F.REPORTDATE(rep.byend))-1) → December 31, 2014 (2015 - 1).
rep.everyquarter: Quarter step for averaging.
4: Shifts the result forward by 4 periods. For example:
Q1 2015 result: (Q1 2012 + Q1 2013 + Q1 2014) / 3
Q2 2015 result: (Q2 2012 + Q2 2013 + Q2 2014) / 3
etc.
If the period shift parameter is omitted, the result will display in 2014.
F.AVGPERIOD(A, 12, F.DATE(1, 1, F.YEAR(F.REPORTDATE(rep.byreport))-2), F.DATE(31, 12, F.YEAR(F.REPORTDATE(rep.byreport))-1), rep.everymonth, 12)
This function calculates the monthly average of variable "A" over the two preceding years, based on the reporting date:
The average for 2011 and 2012 will display in 2013.
The average for 2012 and 2013 will display in 2014.
The average for 2013 and 2014 will display in 2015.
And so on.
The F.AVGTAB function calculates the average value of an indicator split by a catalog.
F.AVGTAB(<indicator>, '<catalog code>')
- indicator - the indicator variable for which the average value is to be calculated
- catalog code - the code of the catalog used to split the data when calculating the average value.
F.AVGTAB(A, 'Employee')
The indicator corresponding to variable A is split by the "Employee" catalog. From the resulting list of <Catalog value> = <Indicator value> pairs, the sum of the indicator values is divided by the number of catalog entries. Unassigned analytics are included in both the sum and the count.
Note:
At first glance, it might seem that:
F.AVGTAB(A, 'Employee') is equivalent to
F.SUMTAB(A, 'Employee') / F.ANALITCOUNT(A, 'Employee'), but this is not generally true.
F.ANALITCOUNT() does not include unassigned analytics, while F.AVGTAB() does.
Suppose splitting by the "Employee" catalog for indicator A yields the following values:
'Ivanov' = 15
'Petrov' = 5
'Sidorov' = 10
'Unassigned value' = 7,
Then:
F.SUMTAB(A, 'Employee') = 37
F.ANALITCOUNT(A, 'Employee') = 3
F.SUMTAB(A, 'Employee') / F.ANALITCOUNT(A, 'Employee') = 37 / 3 = 12,(3)
F.AVGTAB(A, 'Employee') = 37 / 4 = 9.25
The F.COUNT function calculates the number of values in an indicator over a period at a specified period step or the number of elements in an array.
F.COUNT(<indicator>, int <start date>, int <end date>, REP.EVERY*, {<filter>})
or
F.COUNT(<indicator>),
which is equivalent to:
F.COUNT(<indicator>, F.TODAY(0, rep.bystart), F.TODAY(0, rep.byend), F.REPORTSTEP(<indicator>))
F.COUNT([<expression>{, <expression>}])
- indicator - variable code or expression
- start date - date from which the calculation starts (default: reporting period)
- end date - date until which the calculation is performed (default: reporting period)
- REP.EVERY* - constant corresponding to the period step (default: reporting period step)
- optional filter for the indicator's catalogs
- expression - any syntactically valid expression that evaluates to a number
F.COUNT(A)
Returns the number of entries for the indicator "A" during the reporting period.
F.COUNT(A, 20140101, 20141231, rep.everymonth)
Returns the number of entries for the indicator "A" during the specified period.
F.COUNT(A, F.TODAY(0, rep.bystart), F.TODAY(0, rep.byend), rep.byreport)
Returns the number of entries for the indicator "A" during the specified period.
F.COUNT(A, 20140101, F.TODAY, rep.everymonth, 'branch' = 'Moscow Branch' AND 'branch' = 'Tver')
Returns the number of entries for the indicator "A" for the Moscow and Tver branches at a monthly period step, starting from January 1, 2014.
F.COUNT([A, B])
Returns the number of elements in the array: 2.
The F.GETREFVALUE function searches for an element in a catalog based on a pattern in the first specified field. If successful, it returns the value from the second field; otherwise, it returns 0.
F.GetRefValue(<catalog>, <catalog field>, <pattern>, <catalog field>)
- catalog - string containing the catalog code.
- catalog field - string containing the identifier of the catalog field.
- pattern - pattern to search for.
- catalog field - string containing the identifier of the catalog field.
F.GetRefValue('BudgetSlice', 'Code', '5206463403', 'DocID')
Writes a reference to the catalog value '5206463403' into the reference field of the "BudgetSlice" catalog in the indicator data.
F.GetRefValue('Approver', 'DocID', Costs.Disposer, 'DocID')
Calculates the value of the reference field for the "Disposer" catalog in the base indicator based on the reference field of the same "Disposer" catalog in the "Costs" catalog.
F.GetRefValue('Approver', 'Code', Costs.Disposer, 'DocID')
Calculates the value of the "Disposer" catalog in the base indicator based on the string field "Disposer" in the "Costs" catalog.
F.GetRefValue('Percentages', 'DocID', f.matrixrefvalue('DSS'), 'Name')
Writes the name of the catalog value "Percentages" (calculated using a dynamic list/catalog with the code "DSS") into the string field of the base indicator.
F.GetRefValue ('Период', 'Code', F.Str(F.Year(DateOper)) +'.'+ F.Str(f.if(F.Month(DateOper)> 6, 2, 1)) +'.'+ F.Str(f.if(F.Month(DateOper)< 4, 1, f.if(F.Month(DateOper)< 7, 2, f.if(F.Month(DateOper)< 10, 3, 4))
Calculates the value of the reference field for the system catalog "Period" in the indicator data based on the date value of the indicator.
The F.MATRIXREFVALUE function returns catalog values calculated based on an analytical key from matrix versions of the types "Dynamic List/Catalog" and "Dynamic List/Number" as of a specific date.
F.MATRIXREFVALUE(<matrix>{, <date>})
- matrix - a string containing the code of a transformation matrix of type "Dynamic List/Catalog" or "Dynamic List/Number".
- date - an optional field specifying the date for which the matrix version is retrieved (if not provided, the value from the DateOper field is used)
F.MatrixRefValue('BudgetSlice') or F.MatrixRefValue('BudgetSlice', DateOper)
Writes a reference to a catalog value (calculated using the transformation matrix with the code "BudgetSlice" as of the indicator's date value) into the reference field for the "BudgetSlice" catalog in the indicator data.
The F.PERIODNUMBER function returns the number of the step currently being calculated.
F.PERIODNUMBER(REP.BYREPORT | REP.BYCURRENT)
- REP.BYCURRENT - returns the step number within the period step of the calculated indicator.
- REP.BYREPORT - returns the step number within the period step of the report.
F.PERIODNUMBER(rep.byreport)
For an annual report with a quarterly period step and a calculated indicator with a monthly period step, it will sequentially return 1, 2, 3, 4.
F.PERIODNUMBER(rep.bycurrent)
For an annual report with a quarterly period step and a calculated indicator with a monthly period step, it will sequentially return 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
The F.PREVVALUE function returns the value of an indicator taken a specified number of steps back in the indicator's period step.
F.PREVVALUE(<indicator>, int <expression>)
- indicator - the variable for which the value from a previous period is returned.
- expression - the number of steps back in the indicator's period step.
F.PREVVALUE(A, 1)
Returns the value of variable "A" from the previous period.
F.PREVVALUE(A, 2)
Returns the value of variable "A" from the period before the previous one.
The F.PREVVALUETHIS function returns the value of the current indicator taken a specified number of steps back in the indicator's period step.
F.PREVVALUETHIS(int <expression>)
- expression - the number of steps back in the indicator's period step.
A + F.PREVVALUETHIS(1)
Returns the sum of the values of the indicator "A" for the current and previous period.
A + F.PREVVALUETHIS(2)
Returns the sum of the values of the indicator "A" for the current period and the period before the previous one.
f.if (F.MONTH (F.REPORTDATE (rep.byreport)) = 1, A, f.if ( F.PERIODNUMBER (rep.bycurrent) <= 0, 0, f.if ( F.PERIODNUMBER (rep. bycurrent) = 1, F.SUM( A , F.DATE (01, 01,F.YEAR(F.REPORTDATE (rep.byreport)) ), F.TODAY(0, rep.byend), rep.everymonth), A + F.PREVVALUETHIS (1))))
Returns the value equal to variable "A" from the previous period, used to calculate the cumulative total from the beginning of the year.
The F.PROGRESIVESUM function calculates the cumulative total of an indicator's data, grouped by the indicator's period step, for one of the specified periods.
F.PROGRESIVESUM(<indicator>, rep.everyyear | rep.everyhalf | rep.everyquarter | rep.everymonth)
- indicator - the indicator variable for which to calculate the cumulative total within the specified period step.
- rep.everyyear - cumulative total is calculated from the beginning of each year.
- rep.everyhalf - cumulative total is calculated from the beginning of each half-year.
- rep.everyquarter - cumulative total is calculated from the beginning of each quarter.
- rep.everymonth - cumulative total is calculated from the beginning of each month.
F.PROGRESIVESUM (A, Rep.EveryYear)
For a period spanning January to December of one or multiple years, the function calculates the monthly cumulative total within each year:
-
January returns the value for January.
-
February returns January + February.
-
March returns January + February + March.
And so on.
The F.REPORTSTEP function returns one of the REP.EVERY* constant values, which corresponds to the current period step of an indicator or a report.
F.REPORTSTEP({<indicator>})
- indicator - variable code
f.if(F.REPORTSTEP(A) = rep.everymonth, 1, 2)
Returns 1 for the indicator "A" with a monthly step, and 2 for other indicators with any other step.
F.REPORTSTEP(A)
Returns the period step of the indicator "A" as a numeric value:
-
Day: 4
-
Week: 5
-
Month: 6
-
Quarter: 7
-
Half-year: 8
-
Year: 9
F.REPORTSTEP()
Returns the period step of the report (values 4–9).
The F.SUMTAB function calculates the sum of an indicator split by a catalog.
F.SUMTAB(<indicator>, <catalog>)
- indicator - variable code or expression
- catalog - code of the catalog by whose values the splitting is performed during summation
F.SUMTAB(X, 'branch')
Returns the total sum of variable X for the reporting period at the reporting period step, split by the "branch" catalog.
X is a calculated indicator equal to the product of two base indicators A * B, each of which has analytics linked to the 'branch' catalog:
| Branch | A | B |
|---|---|---|
| branch 1 | 1,00 | 7,00 |
| branch 2 | 2,00 | 8,00 |
| branch 3 | 3,00 | 9,00 |
| Total: | 6,00 | 24,00 |
The F.SUMTAB function will calculate the total sum of the products A * B broken down by the 'branch' catalog (as in a tabular report) for the reporting period:
F.SUMTAB(X, 'branch') = 7 + 16 + 27 = 50
The F.SUM function, in this case, will calculate the sum of the indicator "A" for the specified period and multiply it by the sum of the indicator "B" for the same period:
F.SUM(X, 20140101, 20141231, rep.everymonth) = 6 + 24 = 30
The F.SUM function calculates the sum of an indicator over a period at a specified period step or the sum of an array.
F.SUM(<indicator>, int <start date>, int <end date>, REP.EVERY*, {<filter>}, {bool <expression>})
F.SUM(<indicator>) is equivalent to F.SUM(<indicator>, F.TODAY(0, rep.bystart), F.TODAY(0, rep.byend), F.REPORTSTEP(<indicator>))
F.SUM([<expression>{, <expression>}])
- indicator - variable code or expression
- start date - date from which the calculation starts (default: reporting period)
- end date - date until which the calculation is performed (default: reporting period)
- REP.EVERY* - constant corresponding to the period step (default: reporting period step)
- optional filter for the indicator's catalogs
- expression - any syntactically valid expression that evaluates to a number
F.SUM(A, 20140101, 20141231, rep.everymonth)
Returns the sum of monthly values of the Indicator "A" for the year 2014.
F.SUM(A, 20140101, 20141231, rep.everymonth, 'branch' = 'Moscow Branch')
Returns the annual sum of monthly values of the Indicator "A" with the analytics "Moscow Branch" from the "Branches" catalog (catalog code: 'branch').
F.SUM(A, F.TODAY(-1, rep.bystart), F.TODAY(0, rep.byend), rep.everymonth)
Returns the sum of the Indicator A for the period from the start of the previous calculation month to the end of the current calculation month.
To calculate the start date and end date, the F.TODAY function with an offset is used.
F.TODAY(-1, rep.bycurrent) -- current date minus 1 month (for a monthly report step)
F.TODAY(0, rep.byend) -- end of the current month (e.g., end of November)
F.SUM(A, F.REPORTDATE(rep.bystart), F.TODAY(0, rep.byend), rep.everymonth)
Returns the cumulative total for the period.
F.REPORTDATE(rep.bystart) – returns the report start date
F.TODAY(0, rep.byend) – returns the column date
For January to December 2014, the sum is calculated as a monthly cumulative total up to the current report column:
-
January: January value
-
February: January + February
-
March: January + February + March
etc.
F.SUM(A, F.TODAY(f.if(F.REPORTSTEP=rep.everymonth, -12, f.if(F.REPORTSTEP=rep.everyquarter, -4,
f.if(F.REPORTSTEP=rep.everyhalf, -2, -1))), rep.bystart), F.TODAY(f.if(F.REPORTSTEP=rep.everymonth, -12, f.if(F.REPORTSTEP=rep.everyquarter, -4, f.if(F.REPORTSTEP=rep.everyhalf, -2, -1))), rep.byend), rep.bycurrent)
Returns the sum of the indicator "A" for the current period shifted forward by one year.
For a 2015 quarterly report:
-
Q1 2015 - sum for Q1 2014
-
Q2 2015 - sum for Q2 2014
etc.
For a 2015 half-year report:
- H1 2015 - sum for H1 2014
For a 2015 annual report: 2015 - Sum for 2014
F.SUM(A, F.DATE(01, f.if(F.QUARTER(F.REPORTDATE(rep.byreport))=1, 01, f.if(F.QUARTER(F.REPORTDATE(rep.byreport))=2, 04, f.if(F.QUARTER(F.REPORTDATE(rep.byreport))=3, 07, 10 ) ) ), F.YEAR(F.REPORTDATE(rep.byreport))), F.TODAY(0, rep.byend), rep.everyweek)
Returns a weekly cumulative total for each quarter of the report year.
F.SUM(A, F.DATE(01, 01, F.YEAR(F.REPORTDATE(rep.byreport))), F.TODAY(0, rep.byend), rep.everymonth)
Returns a monthly cumulative total for each report year. For faster cumulative total calculation, use:
f.if(F.Month(F.REPORTDATE(rep.byreport)) = 1, A,
f.if( f.periodnumber(rep.ByCurrent) <= 0, 0, f.if( f.periodnumber(rep.ByCurrent) = 1,
F.SUM( A , F.DATE (01, 01,F.YEAR(F.REPORTDATE(rep.byreport)) ), F.ToDay(0, rep.byend), rep.everymonth),
f.prevvaluethis(1) + A)))
F.SUM( [A , B])
Returns the sum of variables in the array. This is more efficient than A + B.
The F.VALPOSTAB function returns the value of an indicator by its position in a sorted list within the context of an analytical catalog.
F.VALPOSTAB(<indicator>, ‘<catalog code>’, <position>, <sort direction>)
- indicator - the indicator variable whose value is to be returned from a specified position in the catalog-split and value-sorted list.
- catalog code - the code of the catalog used for splitting.
- position - the position number from which to return the catalog-split value.
Any syntactically valid expression that returns a number in the range from 1 to the number of items included in the catalog splitting (i.e., from 1 to F.ANALITCOUNT() for the same catalog).
For any other values, the function returns 0.
If the list of values after catalog splitting is empty (i.e., F.ANALITCOUNT() = 0), the function also returns 0. The position is the number of the position from which to return the catalog-split value.
- Sort direction - true (or 1) — sort in ascending order, false (or 0) — sort in descending order.
F.VALPOSTAB(A, ‘OrgStructure’, 3, 1)
For a base indicator linked to variable A with the following values in the "OrgStructure" catalog:
15 - Power Unit 1
20 - Power Unit 2
10 - Power Unit 3
The function returns the value at position 3 of the sorted list:
10 - Power Unit 3
15 - Power Unit 1
20 - Power Unit 2
So, the result of the function will be 20.
Import Setup Script Wizard
The F.DIST function distributes a specified total amount (parameter 2) with a defined precision (parameter 1) based on a weight value (parameter 3).
F.DIST(int <expression1>, float <expression2>, float <expression3>)
- expression1 - an integer from 0 to 16, representing the number of decimal places for the delta (error margin) between parameter 2 and the sum of the product of parameter 3 (distribution coefficient for a data row) and parameter 2 (total sum for all data rows).
- expression2 - a number or parameter (variable) defining the total amount to be distributed.
- expression3 - a variable or formula used to calculate the distribution coefficient for a data row.
In a calculated field (e.g.,4), the proportion of employees in each department (e.g.,1) relative to the total number of employees in the company (e.g.,3) is calculated.
The sum of all values in column (e.g.,4) should equal 1. However, due to rounding errors across many rows with small values (e.g.,1), the sum may not exactly equal 1.
It is necessary to compute the delta between 1 and the obtained sum (e.g.,4) and distribute this difference proportionally to each row value (e.g.,4).
| А | Parameter | F. TSUM (A) | А/B | F.DIST(5, 1, А/B ) | |
|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | |
| 20,00 | Department 1 | 11 565,00 | 0,00177746178… | 0,00177746178… | |
| 5,00 | P | Department 2 | 11 565,00 | 0,00177746178… | |
| ... | P1 | Department N | 11 565,00 | ... | |
| Sum | 11 565,00 | 0,99... | 1,00000 |
The function F.DIST(5, 1, A/B) will calculate the sum of values A/B, compare it to 1, and proportionally distribute the missing difference across the rows (5). It will then compare the sum of values (5) to 1. If the resulting sum (5) does not reach exactly 1 with a precision of 5 decimal places, it will calculate the difference again and redistribute it proportionally row by row. This process repeats until the sum of values (5) equals 1.
The F.TSUM function calculates the sum of values from a specified numeric field based on a given condition. Specifying the condition is optional; if omitted, the function returns the sum of all values from the listed fields.
F.TSUM(float <expression>{, float <expression1>, ..., float <expressionN>})
- expression - a numeric field whose values are to be summed, or a formula used to calculate a numeric value for summation.
To sum values of the fields:
- "A" (e.g., 4),
- "A" and "B" (e.g., 5),
- "A" where parameter "P1" meets a condition (e.g., 6):
| A | B | Parameter | F. TSUM (A) | F. TSUM (A, B) | F. SUM ( F.IF (Parameter = 'P1' , А, 0) |
|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 |
| 15,00 | 1,00 | P1 | 45,00 | 51,00 | 25,00 |
| 20.00 | 2,00 | P | 45,00 | 51,00 | 25,00 |
| 10,00 | 3,00 | P1 | 45,00 | 51,00 | 25,00 |
The F.GROUPSUM function performs summation of values from a specified numeric field based on a specified grouping of fields. Specifying the grouping fields is optional; if omitted, the function returns the sum across the entire dataset.
F.GROUPSUM(float <expression>, { <argument1>, ..., <argumentN> })
- expression1 - the numeric field whose values are to be summed.
- optional grouping fields - fields used to group the data during summation.
To sum the values of the "Amount" field grouped by the fields "Parameter1" and "Parameter2", the function would be written as follows:
| Sum | Parameter1 | Parameter2 | F.GROUPSUM (Sum, Parameter1) | F.GROUPSUM (Sum, Parameter1,Parameter2) |
|---|---|---|---|---|
| 15 | P1 | P21 | 25 | 45 |
| 20 | P1 | P22 | 20 | 45 |
| 10 | P1 | P21 | 25 | 45 |
The F.HI function converts a string to uppercase.
F.HI(string <expression>)
- expression - the string whose characters need to be converted to uppercase.
The F.LO function converts a string to lowercase.
F.LO(string <expression>)
- expression - the string whose characters need to be converted to lowercase.
The F.LTRIM function removes leading spaces in a string.
F.LTRIM(string <expression>)
- expression - the string from which leading spaces need to be trimmed.
The F.REPLACE function replaces the first occurrence of a value (parameter 2) with another value (parameter 3) in a string (parameter 1).
F.REPLACE(string <expression1>, string <expression2>, string <expression3>)
- expression1 - the string in which the replacement is performed.
- expression2 - the substring/value to be replaced.
- expression3 - the substring/value to replace with.
The F.RTRIM function removes trailing spaces in a string.
F.RTRIM(string <expression>)
- expression - the string from which trailing spaces need to be trimmed.
Function F.STR returns the string representation of a number.
F.STR(float <expression>)
- expression – the expression to be converted to a string
Function F.STRDATE returns the string representation of a date.
F.STRDATE(float <expression>)
- expression – the expression to be converted to a string
The F.TRIM function removes leading and trailing spaces in a string.
F.TRIM(string <expression>)
- expression - the string from which leading and trailing spaces need to be trimmed.
Functions of KPI Card
The F.VARISENABLED function returns TRUE if the specified variable belongs to a row included in the KPI Map calculation. Otherwise, it returns FALSE.
F.VARISENABLED(<variable>)
- variable - KPI map cell variable
F.VARISENABLED(<H1>)
Returns 1 (TRUE) if the variable belongs to a row participating in the calculation.
Otherwise, returns 0 (FALSE).
Parameters
– current period step
– end of the period
– report period step
– beginning of the period
– half-year period step
– minute period step
– month period step
– second period step
– week period step
– hourly period step
– unknown period step
– day period step
– hourly period step
– quarter period step