Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rosscortb
Post Patron
Post Patron

Count column and return value that appears most

Hello

 

I am tring to return the numberic value of the most used text value in a column [Exit][Why are you leaving]

 

Any ideas

 

tried the max functions but couldn't get it quite work.

 

Thanks

Ross

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@rosscortb ,

 

Generally, you can first create a calculate column using DISTINCTCOUNT() function to achieve the number of frequency in each text. Then create a measure using MAX() function to get result, for example, the measure may be like pattern below:

Result =
CALCULATE (
    MAX ( Table[Exit] ),
    FILTER ( Table, Table[Calculate Column] = MAX ( Table[Calculate Column] ) )
)

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@rosscortb ,

 

Generally, you can first create a calculate column using DISTINCTCOUNT() function to achieve the number of frequency in each text. Then create a measure using MAX() function to get result, for example, the measure may be like pattern below:

Result =
CALCULATE (
    MAX ( Table[Exit] ),
    FILTER ( Table, Table[Calculate Column] = MAX ( Table[Calculate Column] ) )
)

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Gordonlilj
Solution Sage
Solution Sage

Hi,

 

You could try the solution provided in this post:

How to obtain the most common value from a column and display it? 

thanks, you don't happen to number how return the top value not numeric count but the actual text value. i've only managed to return the text value of the one with the most characters.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.