cancel
Showing results for
Search instead for
Did you mean:
Highlighted
Helper II

## Measure to get Value with the highest (SUM)

Hi, hopefully someone can help me

I have a table in my Tabular Model that looks like the below

 Date Description Calls 01/01/2020 IT 345 01/02/2020 Legal 23 01/02/2020 Helpline 2345

What I want to build is a measure that just brings me the Description with the highest Calls in the period. So for the above, the Measure would show "Helpline" as it has 2345 calls.

I have created the below but it doesn't work for me and gives me the wrong description - can anyone help?

ParallelName:=CALCULATE(LASTNONBLANK('Productivity'[Description],0),FILTER(VALUES('Productivity'[Description]),rankx(all('Productivity '[Description]),[Calls],,ASC) = 1 ))

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver II

## Re: Measure to get Value with the highest (SUM)

Hi @JD09631 ,

this should answer your question:

https://community.powerbi.com/t5/Desktop/DAX-Retrieve-a-value-in-one-column-based-on-MAX-in-another/...

Please give kudos to the original responder in the linked post.

3 REPLIES 3
Highlighted
Resolver II

## Re: Measure to get Value with the highest (SUM)

Hi @JD09631 ,

this should answer your question:

https://community.powerbi.com/t5/Desktop/DAX-Retrieve-a-value-in-one-column-based-on-MAX-in-another/...

Please give kudos to the original responder in the linked post.

Highlighted
Super User IV

## Re: Measure to get Value with the highest (SUM)

@JD09631 , Why asc sort when you need highest?

try

DRank = RANKX(all(Table[Description]),[Calls])

Rank 1 top = maxx(filter(VALUES(Table[Description]),[DRank]=1),Table[Description] )

or

Top 1 Rank = CALCULATE(max(Table[Description]),TOPN(10,all(Table[Description]),[Calls],DESC),VALUES(Table[Description]))

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper II

## Re: Measure to get Value with the highest (SUM)

Hi, this works perfect for me thank you.

What would be the best way of using this to get the 2nd highest SUM?

## Helpful resources

Announcements

#### Get Ready for Power BI Dev Camp

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

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

#### Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors