Bottom N Count


πŸ“Š Bottom N Count Function

πŸ” Definition

The Bottom N Count function is used for:

➑️ Counting (Count) the value of a field
➑️ Retrieving N data with the SMALLEST count value


πŸ‘‰ The opposite of Top N Count

βš™οΈ Parameter

1. 🎯 Field

Fields to be counted

Example:

2. πŸ”’ Number of Record (N)

The amount of data to be displayed (Bottom N)

Example:

3. πŸ”€ Ordered (Y/N)

πŸ“Œ Recommended: use Y for clear results

πŸ“₯ Input & πŸ“€ Output

Input Output
The output will contain:

🧠 How it works

Sample Data:
    category	views
    ------------------
    A           100
    A           200
    B           300
    B           100
    C           50

Step 1: Count per category

    category	count_views
    ----------------------
    A           2
    B           2
    C           1

Step 2: Bottom N (for example N=2)

    category_new    count_views
    -------------------------
    C               1
    A               2   
    

πŸ§ͺ Case Study

🎯 Case:

Showing 3 categories with the LOWEST total count

πŸ”„ Workflow
  1. Source data
  2. GroupBy β†’category
  3. Bottom N Count:
    • Field =views
    • Number of Record =3
    • Ordered =Y
πŸ“Š Output:
    category_new    count_views
    --------------------------
    Education       10
    Travel          15
    Music           20

πŸ’‘ Important Note:

The useful output fields from this buffer function are the grouped fields and new fields. Add a Transformator () assembly afterward to select these fields.