cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AndrejBI
Helper V
Helper V

Using DAX to filter a person with MAX money?

Hi, 

 

I want to create a tooltip that shows a person with the most money: 

 

Bananas

Erik13$
BananasAdam15$
BananasJosh11$
ApplesErik9$
ApplesAdam3$

 

The tooltip should show the following:

  • after hovering over Bananas the name Adam (15$) would be shown
  • after hovering over Apples the name Erik (9$)

 

I imagine it has to do something with MAX function, any ideas on how to achieve this? 

 

1 ACCEPTED SOLUTION
FrankAT
Super User II
Super User II

Hi @AndrejBI ,

give this a try:

 

23-07-_2021_00-00-53.png

 

Max Amount =
VAR _Table =
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[Fruit] ),
        'Table'[Amount] = MAX ( 'Table'[Amount] )
    )
RETURN
    MAXX ( _Table, 'Table'[Name] ) & " ("
        & MAXX ( _Table, 'Table'[Amount] ) & "$ )"

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

1 REPLY 1
FrankAT
Super User II
Super User II

Hi @AndrejBI ,

give this a try:

 

23-07-_2021_00-00-53.png

 

Max Amount =
VAR _Table =
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[Fruit] ),
        'Table'[Amount] = MAX ( 'Table'[Amount] )
    )
RETURN
    MAXX ( _Table, 'Table'[Name] ) & " ("
        & MAXX ( _Table, 'Table'[Amount] ) & "$ )"

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors