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
Community Champion
Community Champion

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
Community Champion
Community Champion

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
Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Power BI Womens Summit 2021 768 x460.jpg

Interviews, learning sessions, allies, and more!

#PowerBIWomenSummit

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

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