Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Report Builder - Ranking 2 most common entries in column

Hi everyone, 

 

This issue is making me insane and I can't figure it out. My 'Dataset5' contains a column with codes in it that are text and numbers like below:

 

Names

John5
Alice1
Robert2
Alice1
Michael4
Sarah6
Daniel7
Olivia8
Matthew9
John5

 

What I am trying to do in power bi report builder, is to write an expression that will rank these names according to the two most common.  In this case, John5 and Alice1 are the two most common. I want the expression to return the result John5 and Alice1. 

 

Ideally, I would like it to compare against my date column and only rank the two from the previous month. 

 

Can someone help me with this??

1 Reply