Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

Count

Use this command to return the number of items in a list. This command can be used with either a list variable, symbol, or a file name.

Note: Only those symbols to which the user has access will be included in the return list.

Syntax:

COUNT (Variable)

COUNT ("DimName", "SymName#")

COUNT ("ScheduleName", "DimName", "SymName#")

COUNT ("FileName")

where:

  • Variable is the name of a variable.
  • DimName is the name of a dimension containing the symbols.
  • Schedule is the name of a schedule.
  • SymName# is the name of a symbol and any relevant symbol hierarchy specification.
  • FileName is the name of a file. In this case, the COUNT function returns the number of lines in a text file. This may be useful if you want to verify the record counts output to log files generated.

    Note: If only one parameter is specified, the function will check the validity of the parameter in the following order:

    • valid variable name
    • valid file in memory
    • valid physical file name

Syntax example:

CREATE VARIABLE Count1[] AS String

CREATE VARIABLE CNT as NUM

SET VARIABLE Count1 = "P01ytd | p02ytd"

SET VARIABLE CNT = count ("Count1")

 

Syntax example:

CREATE VARIABLE List

CREATE VARIABLE listcount

CREATE VARIABLE listcount2

CREATE VARIABLE listcount3

SET VARIABLE List = CreateList("Symbols", "Database" "Accounts", "TrialBalance###")

SET VARIABLE listcount = Count(List)

SET VARIABLE listcount2 = Count(Accounts, TrialBalance###)

Published:

Count

Use this command to return the number of items in a list. This command can be used with either a list variable, symbol, or a file name.

Note: Only those symbols to which the user has access will be included in the return list.

Syntax:

COUNT (Variable)

COUNT ("DimName", "SymName#")

COUNT ("ScheduleName", "DimName", "SymName#")

COUNT ("FileName")

where:

  • Variable is the name of a variable.
  • DimName is the name of a dimension containing the symbols.
  • Schedule is the name of a schedule.
  • SymName# is the name of a symbol and any relevant symbol hierarchy specification.
  • FileName is the name of a file. In this case, the COUNT function returns the number of lines in a text file. This may be useful if you want to verify the record counts output to log files generated.

    Note: If only one parameter is specified, the function will check the validity of the parameter in the following order:

    • valid variable name
    • valid file in memory
    • valid physical file name

Syntax example:

CREATE VARIABLE Count1[] AS String

CREATE VARIABLE CNT as NUM

SET VARIABLE Count1 = "P01ytd | p02ytd"

SET VARIABLE CNT = count ("Count1")

 

Syntax example:

CREATE VARIABLE List

CREATE VARIABLE listcount

CREATE VARIABLE listcount2

CREATE VARIABLE listcount3

SET VARIABLE List = CreateList("Symbols", "Database" "Accounts", "TrialBalance###")

SET VARIABLE listcount = Count(List)

SET VARIABLE listcount2 = Count(Accounts, TrialBalance###)

For an optimal Community experience, Please view on Desktop