cancel
Showing results for 
Search instead for 
Did you mean: 

Mode - Single Column

Super User
986 Views
Highlighted
Super User
Super User

Mode - Single Column

Imagine you have a table of data with multiple columns like this...

 

Column

A
B
C
A
B
C
A
A
A
B
B
C

 

...and you wish to figure out what value occurs most often in that column. You can use a measure like this:

 

 

Mode = VAR myTable = SUMMARIZE(Table,Table[Column],"Count",COUNT(Table[Column]))
VAR myTable2 = FILTER(myTable,[Count]=MAXX(myTable,[Count]))
VAR Mode1 = MAXX(LASTNONBLANK(myTable2,[Column]),[Column])
RETURN Mode1

 

This quick measure would take as input a column in which to calculate the mode.

 

 


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!