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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to return group name of maximum value? DAX

Hello,

 

I am relatively new to Power BI so my apologies if this has been answered. I have not been able to stumble across a similar thread.

 

I am working on creating a visual and in the tooltips I want to display the group with the most occurrences. Below are two screenshots of the visuals I am working with. The stacked column chart is where I would like to display the tool tip, and the Table is illustrating the value I'd like to display within the tooltip.

 

So when I would hover over one of the columns, I am able to display the max value for that column with the below DAX code. However, I would like to display the Group that holds that max value. So if I hovered over a column and the max value for that column happened to be 27, the tooltip would display A.

 

Group Count = 

COUNTX (

    FILTER ( tableName, EARLIER ( tableName[Group] ) = tableName[Group && tableName[Group] = 'SomeValue' ),

    tableName[Group]

)

 

Group 

Num Occurrences

A

27
B27
C25
D24
E22
F17

 

ExampleUsername_1-1666967094616.png

 

 

 

 

 

 

 

 

 

 

Any help and/or suggestions would be appreciated.

 

Thank you

2 REPLIES 2
lbendlin
Super User
Super User

You may need to use a custom tooltip page for that.  Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...

Anonymous
Not applicable

Thanks - I have updated to include sample data.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors