Counting records

Modified on Wed, 20 Sep, 2023 at 3:12 PM

Scripting mode: COUNT command

You can count all records in a table, or only those that meet a specified condition. The results are displayed in the Analytics display area.

If no condition is specified, the total number of records in the table is displayed in the status bar. If a global filter has been applied to a view, the number of records remaining in the table after the filter has been applied is displayed in the status bar.

Steps

  1. Select Analyze > Count.
  2. On the Main tab, you can optionally do one of the following:

    Enter a condition in the If text box.

    Click If to create an IF statement using the Expression Builder.

    The IF statement considers all records in the view and filters out those that do not meet the specified condition.

  3. Click the More tab.
  4. In the Scope panel, select the appropriate option:

    • All
    • First
    • Next
    • While
      Scope optionDetails
      All(Default) Specifies that all records in the view are processed.
      FirstEnter a number in the text box. Starts processing at the first record in the view and includes only the specified number of records.
      NextEnter a number in the text box. Starts processing at the currently selected record in the view and includes only the specified number of records. The actual record number must be selected in the leftmost column in the view, not data in the row.
      While

      Use a WHILE statement to limit the processing of records in the view based on a particular criterion or set of criteria.

      Enter a condition in the While text box, or click While to create a WHILE statement using the Expression Builder.

      A WHILE statement allows records in the view to be processed only while the specified condition evaluates to true. As soon as the condition evaluates to false, the processing terminates, and no further records are considered.

      You can use the While option in conjunction with the All, First, or Nextoptions. Record processing stops as soon as one limit is reached.


      Note

      The First or Next options reference either the physical order or the indexed order of records in a table. First or Next disregard any filtering or quick sorting applied to a table view. However, output results of analytical operations respect any filtering.

      If a view is quick sorted, Next behaves like First.


  5. Click OK.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article