Function Handbook

On this page, you can explore the functions and parameters available in the KPI MONITOR software. Our extensive experience in BI solutions has enabled us to develop a comprehensive set of functions for efficient and user-friendly interaction with our product.

Operator

Description

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

Syntax

(<expression1>) AND (<expression2>)

Description:

  • expression1 - First test condition that evaluates to TRUE or FALSE.
  • expression2 - Second test condition that evaluates to TRUE or FALSE.
Example

F.IF (A > 0 AND B=5, B, 0)

Returns B if A is greater than 0 and B equals 5; otherwise returns 0.

Description

The IF function returns one value if a specified condition evaluates to TRUE, and another value if it evaluates to FALSE.

Syntax

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.
Example

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.

Description

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).

Syntax

<'Catalog code'> LIKE <'Pattern'>

  • Catalog code – The code/identifier of the catalog.

  • Pattern – A substring, part of a word, or phrase to match.

Example

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".

Description

The NOT operator negates a condition.

Syntax

NOT (<Condition_Operator>)

  • Condition_Operator – The argument representing the condition or operator to be negated.
Example

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.

Description

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).

Syntax

<'Catalog code'> NOT LIKE <'Pattern'>

  • Catalog code – The code/identifier of the catalog.

  • Pattern – A substring, part of a word, or phrase to match.

Example

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".

Description

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.

Syntax

(<expression1>) OR (<expression2>)

Example

F.IF (A > 0 OR B=5, B, 0)

Mathematical functions

Description

The F.ARCCOS function returns the arccosine of an angle.

Syntax

F.ARCCOS (float <value>)

  • value – an indicator or an expression for which to calculate the arccosine.
Example

F.ARCCOS (1)

Returns the value of 0.

Description

The F.ABC function returns the modulus (absolute value) of a number, i.e., the number without its sign.

Syntax

F.ABC(float <expression>)

  • expression — A real number whose absolute value is to be found.
Example

F.ABC (3)

Returns the value of 3.

F.ABC (-2)

Returns the value of 2.

Description

The F.ARCCTG function returns the arccotangent of an angle.

Syntax

F.ARCCTG (float <value>)

  • value – an indicator or an expression for which to calculate the arccotangent.
Example

F.ARCCTG (1)

Returns the value 45°

Description

The F.ARCSIN function returns the arcsine of an angle.

Syntax

F.ARCSIN (float <value>)

  • value – an indicator or an expression for which to calculate the arcsine.
Example

F.ARCSIN (1)

Returns the value 90°

Description

The F.ARCTG function returns the arctangent of an angle.

Syntax

F.ARCTG (float <value>)

  • value – an indicator or an expression for which to calculate the arctangent.
Example

F.ARCTG (1)

Returns the value 45°

Description

The function F.COS returns the cosine of an angle.

Syntax

F.COS (float <angle>)

  • angle – an indicator or an expression for which to calculate the cosine.
Example

F.COS(360)

Returns the value of 1.

Description

The F.COUNTFROMSEP function returns the number of significant digits after the decimal separator in a number.

Syntax

F.COUNTFROMSEP (float <expression>)

  • expression – any syntactically valid expression that results in a real value.
Example

F.COUNTFROMSEP(123.1567)

Returns the value of 4.

Description

The F.CTG function returns the cotangent of an angle.

Syntax

F.CTG(float <angle>)

  • angle – an indicator or an expression for which to calculate the cotangent.
Example

F.CTG (45)

Returns the value of 1.

Description

The F.EXP function returns the base of the natural logarithm (e = 2.7182818284590452...) raised to the specified power.

Syntax

F.EXP(float <expression>)

  • expression – an indicator or expression for which to calculate the exponent.
Example

F.EXP (0)

Returns the value of 1.

Description

The F.FLOOR function rounds a number down to the nearest multiple of a specified significance.

Syntax

F.FLOOR(float <expression>, float <precision>)

  • expression – variable code or expression
  • precision – the number of digits (multiple) to which the value is rounded down
Example

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.

Description

The F.LG function returns the base-10 logarithm of a specified number.

Syntax

F.LG (float <expression>)

  • expression – an indicator or an expression for which to calculate the base-10 logarithm.
Example

F.LG (10)

Returns the value of 1.

Description

The F.LN function returns the natural logarithm of a specified number.

Syntax

F.LN (float <expression>)

  • expression – an indicator or an expression for which to calculate the natural logarithm.
Example

F.LN (1)

Returns the value of 0.

Description

The F.MAX function returns the largest value from a set of values.

Syntax

F.MAX(float <expression1>, ..., float <expressionN>)

  • expression1, ..., expressionN - real numbers from which the maximum value is to be found.
Example

F.MAX (2, 3, 1)

Returns the value of 3.

Description

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.

Syntax

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
Description

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.

Description

The F.MAXTAB function calculates the maximum value of an indicator split by a catalog.

Syntax

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.

Example

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.

Description

The F.MIN function returns the smallest value from a set of values.

Syntax

F.MIN(float <expression1>, ..., float <expressionN>)

  • expression1, ..., expressionN - real numbers from which the minimum value is to be found.
Example

F.MIN (2, 3, 5)

Returns the value of 2.

Description

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.

Syntax

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
Example

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.

Description

The F.MINTAB function calculates the minimum value of an indicator split by a catalog.

Syntax

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.
Example

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.

Description

The F.NUMFROMSEP function returns the number after the decimal separator from a given number.

Syntax

F.NUMFROMSEP (float <expression>)

  • expression – any syntactically valid expression that results in a real value.
Example

F.NUMFROMSEP (123.4567)

Returns the value of 4567.

Description

The F.PI function returns the mathematical constant Pi (π) - approximately 3.1415...

Syntax

F.PI

Example

F.PI

For an indicator with measurement accuracy to two decimal places, returns 3.14

Description

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.

Syntax

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)
Example

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

Description

The F.ROUNDDOWN function rounds a value down to the nearest value that is smaller in absolute terms.

Syntax

F.ROUNDDOWN(float <expression>, int <precision>)

  • expression – variable code or expression
  • precision – number of decimal places after rounding
Example

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.

Description

The F.ROUNDUP function rounds a value up to the nearest value that is larger in absolute terms.

Syntax

F.ROUNDUP(float <expression>, int <precision>)

  • expression – variable code or expression
  • precision – number of digits to which the value is rounded
Example

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.

Description

The F.SIN function returns the sine of an angle

Syntax

F.SIN(float <angle>)

  • angle – a numeric value or expression to compute the sine
Example

F.SIN(30)

Returns 0.5

Description

The F.SQRT function calculates the square root of a specified expression or indicator value.

Syntax

F.SQRT(float <expression>)

  • expression – a variable code or expression.
Example

F.SQRT(A)
Returns the square root of the indicator value.

F.SQRT(64)
Returns the value 8.

Description

The F.TG function returns the tangent of an angle.

Syntax

F.TG (float <angle>)

  • angle – an indicator or an expression for which to calculate the tangent.
Example

F. TG (45)

Returns the value of 1.

Date-related functions

Description

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.

Syntax

F.DATE (int <day>, int <month>, int <year>)

Example

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.

Description

The F.DATEADD function returns a date with a specified offset.

Syntax

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)
Example

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.

Description

The F.DATEDIFF function returns the difference between two dates in a specified period step. The result is an integer.

Syntax

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
Example

F.DATEDIFF(rep.everymonth, 20100101, 20101231)

Returns 11 months.

Description

The F.DATENIL function returns the minimum (empty) date value.

Syntax

F.DATENIL()

Example

F.DATENIL

Returns 18991230 - the minimum date value 30.12.1899.

Description

The F.DATEONLY function returns only the date part from a specified value (without the time component).

Syntax

F.DATEONLY(int <date>)

  • date - a date with time from which the date part is extracted.
Example

F.DATEONLY(F.GETDATE)

Returns the current date value without time.

Description

The F.DAY function extracts the day from a date parameter.

Syntax

F.DAY(int <date>, REP.EVERY*)

  • date - the date from which the day is extracted
  • REP.EVERY* - the constant corresponding to the period step
Example

F.DAY(20151101)

Returns the value: 1.

Description

The F.GETDATE function returns the current date and time.

Syntax

F.GETDATE()

Example

F.GETDATE

Returns the current date and time.

Description

The F.HOUR function returns the hour value from a date.

Syntax

F.HOUR(int <date>)

  • date - a date with time from which the hour is extracted.
Example

F.HOUR(F.GETDATE())

Returns the hour from the current date and time.

Description

The F.MINUTE function returns the minute value from a date.

Syntax

F.MINUTE(int <date>)

  • date - a date with time from which the minute is extracted.
Example

F.MINUTE(F.GETDATE())

Returns the minutes from the current date and time.

Description

The F.MONTH function extracts the month from a date parameter.

Syntax

F.MONTH(int <date>)

  • date - the date from which the month is extracted.
Example

F.MONTH(20151101)

Returns the value: 11.

Description

The F.PERIOD function returns the difference between two dates in a specified period step.

Syntax

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
Example

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

Description

The F.PERIODOF function returns the difference between the start and end of the current calculated reporting period step.

Syntax

F.PERIODOF(REP.EVERY*)

  • REP.EVERY* – the constant corresponding to the period step.
Example

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

Description

The F.QUARTER function extracts the quarter from a date parameter.

Syntax

F.QUARTER(int <date>)

  • date - the date from which the quarter is extracted.
Example

F.QUARTER(20151101)

Returns the value: 4

Description

The F.REPORTDATE function returns the current report start date, current report end date, or the date of the current period step.

Syntax

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

Example

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.

Description

The F.SECOND function returns the seconds value from a date.

Syntax

F.SECOND(int <date>)

  • date - a date with time from which the seconds are extracted.
Example

F.SECOND(F.GETDATE())

Returns the seconds from the current date and time.

Description

The F.TODAY function returns the current date (or a date offset from the current date).

Syntax

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.
Example

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.

Description

The F.YEAR function extracts the year from a date parameter.

Syntax

F.YEAR(int <date>)

  • date - the date from which the year is extracted.
Example

F.YEAR(20151101)

Returns the value: 2015

String manipulation functions

Description

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.

Syntax

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: %, _ , [ ] , ^

Example

F.STRFMTTMPL('00000', '123')

Returns the value '00123'

Description

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.

Syntax

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: %, _ , [ ] , ^

Example

F.STRINDEXOF('(', '10 (100%)')

Returns 4

Description

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.

Syntax

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: %, _ , [ ] , ^

Example

F.STRUBSTR( ',', 'Tyumen, Lenina str. 100' )

Returns the value Tyumen.

Description

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).

Syntax

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: %, _ , [ ] , ^

Example

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'.

Description

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.

Syntax

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: %, _ , [ ] , ^

Example

F.SUBSTRBETW(',', ',', 'Tyumen, Lenina str. 100, apt. 99')
Returns the value 'Lenina str. 100'

F.SUBSTRBETW('ATM', ',', 'ATM2345, Branch №1')
Returns the value '2345'

Description

The F.DATESTR function returns the string representation of a date

Syntax

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).
Example

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

Description

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).

Syntax

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
Example

F.ANALITCOUNT(A, 'Employees')

Returns the number of employees for the indicator "A" during the reporting period.

Description

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)

Syntax

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).
Example

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(А)

Description

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).

Syntax

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
Example

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.

Description

The F.AVGTAB function calculates the average value of an indicator split by a catalog.

Syntax

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.
Example

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

Description

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.

Syntax

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
Example

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.

Description

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.

Syntax

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.
Example

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.

Description

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.

Syntax

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)
Example

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.

Description

The F.PERIODNUMBER function returns the number of the step currently being calculated.

Syntax

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.
Example

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.

Description

The F.PREVVALUE function returns the value of an indicator taken a specified number of steps back in the indicator's period step.

Syntax

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.
Example

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.

Description

The F.PREVVALUETHIS function returns the value of the current indicator taken a specified number of steps back in the indicator's period step.

Syntax

F.PREVVALUETHIS(int <expression>)

  • expression - the number of steps back in the indicator's period step.
Example

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.

Description

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.

Syntax

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.
Example

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.

Description

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.

Syntax

F.REPORTSTEP({<indicator>})

  • indicator - variable code
Example

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).

Description

The F.SUMTAB function calculates the sum of an indicator split by a catalog.

Syntax

F.SUMTAB(<indicator>, <catalog>)

  • indicator - variable code or expression
  • catalog - code of the catalog by whose values the splitting is performed during summation
Example

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:

BranchAB
branch 11,007,00
branch 22,008,00
branch 33,009,00
Total:6,0024,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

Description

The F.SUM function calculates the sum of an indicator over a period at a specified period step or the sum of an array.

Syntax

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
Example

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.

Description

The F.VALPOSTAB function returns the value of an indicator by its position in a sorted list within the context of an analytical catalog.

Syntax

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.
Example

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

Description

The F.DIST function distributes a specified total amount (parameter 2) with a defined precision (parameter 1) based on a weight value (parameter 3).

Syntax

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.
Example

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).

АParameterF. TSUM (A)А/BF.DIST(5, 1, А/B )
12345
20,00Department 111 565,000,00177746178…0,00177746178…
5,00PDepartment 211 565,000,00177746178…
...P1Department N11 565,00...
Sum11 565,000,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.

Description

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.

Syntax

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.
Example

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):
ABParameterF. TSUM (A)F. TSUM (A, B)F. SUM ( F.IF (Parameter = 'P1' , А, 0)
123456
15,001,00P145,0051,0025,00
20.002,00P45,0051,0025,00
10,003,00P145,0051,0025,00
Description

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.

Syntax

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.
Example

To sum the values of the "Amount" field grouped by the fields "Parameter1" and "Parameter2", the function would be written as follows:

SumParameter1Parameter2F.GROUPSUM (Sum, Parameter1)F.GROUPSUM (Sum, Parameter1,Parameter2)
15P1P212545
20P1P222045
10P1P212545
Description

The F.HI function converts a string to uppercase.

Syntax

F.HI(string <expression>)

  • expression - the string whose characters need to be converted to uppercase.
Description

The F.LO function converts a string to lowercase.

Syntax

F.LO(string <expression>)

  • expression - the string whose characters need to be converted to lowercase.
Description

The F.LTRIM function removes leading spaces in a string.

Syntax

F.LTRIM(string <expression>)

  • expression - the string from which leading spaces need to be trimmed.
Description

The F.REPLACE function replaces the first occurrence of a value (parameter 2) with another value (parameter 3) in a string (parameter 1).

Syntax

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.
Description

The F.RTRIM function removes trailing spaces in a string.

Syntax

F.RTRIM(string <expression>)

  • expression - the string from which trailing spaces need to be trimmed.
Description

Function F.STR returns the string representation of a number.

Syntax

F.STR(float <expression>)

  • expression – the expression to be converted to a string
Description

Function F.STRDATE returns the string representation of a date.

Syntax

F.STRDATE(float <expression>)

  • expression – the expression to be converted to a string
Description

The F.TRIM function removes leading and trailing spaces in a string.

Syntax

F.TRIM(string <expression>)

  • expression - the string from which leading and trailing spaces need to be trimmed.

Functions of KPI Card

Description

The F.VARISENABLED function returns TRUE if the specified variable belongs to a row included in the KPI Map calculation. Otherwise, it returns FALSE.

Syntax

F.VARISENABLED(<variable>)

  • variable - KPI map cell variable
Example

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