Descriptive Statistic & Basic Maths functions

FREQ.SIMPLE

About

Calculates a simple frequency table of the values in a column.

Sorts in decending order of frequency outputs.

Inputs:

  • data : a single column of data

Code

M.S. Excel
FREQ.SIMPLE = LAMBDA(data,
    LET(
        d, INDEX(data, , 1),
        u, UNIQUE(d),
        X, N(u = TRANSPOSE(d)),
        Y, SEQUENCE(ROWS(d), 1, 1, 0),
        mp, MMULT(X, Y),
        c, CHOOSE({1, 2}, u, mp),
        SORT(c, 2, -1)
    )
);