Working with Data: All the calculations you need t
  • Introduction
  • What is this book?
  • How to Use this Book
  • Document Notes
  • Authors' Thanks
  • Strings
    • Concatenate
    • Split
    • Length
    • Slice
    • Trim
    • Contains
    • Match
    • Replace
    • Upper/Lower Case
  • Numbers
    • Sum
    • Average
    • Roll Ups
    • Round
    • Floor
    • Power
    • Square Root
    • Absolute
  • Dates
    • Date Difference
    • Age
  • Logical
    • Logical Operators
    • If
    • Case / Switch
    • Is Null/Empty
  • General
    • Count
    • Filter
    • Sort
    • Lookup/Join
    • Variables
    • Convert Type
  • Appendix
    • DateTime Parts
    • Helpful Resources
Powered by GitBook
On this page
  • Excel
  • Tableau
  • Alteryx
  • OrgVue
  • tSQL
  • Python

Was this helpful?

  1. General

Count

PreviousGeneralNextFilter

Last updated 5 years ago

Was this helpful?

See also

Excel

=~COUNTA!~(‹range›) (counts all values in the array) OR =~COUNT!~(‹range›) (counts numbers in the range only)

=COUNTA(B:B) // {"ExCo",3,2,1} returns 4
=COUNT(C:C) // {"ExCo",3,2,1} returns 3

Tableau

~COUNT!~(‹field›)

COUNT([Customer ID])

Alteryx

Use the Summarize Tool (in the Transform palette):

(group by field, count by measure).

OrgVue

‹array›.~count!~ (counts all items in the array) OR ‹array›.~cnt!~ (counts numbers in the array only)

array("ExCo",3,2,1).count // Returns 4
array("ExCo",3,2,1).cnt // Returns 3
nodes().count 
// Returns the number of nodes within the current filter

tSQL

~COUNT!~(‹field›)

SELECT COUNT(CustomerID) 
FROM OrdersData

Python

~len!~(‹array›)

len(["ExCo",3,2,1]) # Returns 4
Strings > Length