DAX code
Mode =
VAR ValueCounts = ADDCOLUMNS(VALUES('Sales'[Category]), "@Count", CALCULATE(COUNTROWS('Sales')))
RETURN
MAXX(TOPN(1, ValueCounts, [@Count]), 'Sales'[Category])
Returns the most frequently occurring value in a column across the current filter context.
Type your table and column names once. Every measure below updates.
Mode =
VAR ValueCounts = ADDCOLUMNS(VALUES('Sales'[Category]), "@Count", CALCULATE(COUNTROWS('Sales')))
RETURN
MAXX(TOPN(1, ValueCounts, [@Count]), 'Sales'[Category])
Replace 'Sales'[Category] with the column you want the most frequent value of.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Mode (Most Frequent Value).