/    /  Amazon QuickSight – countOver

Amazon QuickSight – countOver

 

The countOver function in Amazon QuickSight is used to count the number of occurrences of a measure or dimension field in a given partition or window. The function syntax is as follows:

 

Syntax

#Start#
countOver
(
  measure or dimension field 
  ,[ partition_field, ... ]  
  ,calculation level 
)
#End#

 

This function takes the following arguments:

 

  • measure or dimension field: The measure or dimension field to count.
  • partition_field: Optional. The partition field(s) to partition the data by. This field will reset the count for each unique value in the partition.
  • calculation level: Optional. The level of aggregation at which to perform the count. The default is the highest level of aggregation.

 

Here’s an example of using the countOver function in Amazon QuickSight to count the number of occurrences of a dimension field “Product” within each unique value of the “Region” partition field:

 

Example

#Start#
countOver(
    Product,
    [Region]
)
#End#

 

This will return the count of each unique “Product” value within each unique “Region” value in the dataset.