Forum Discussion
yewling1201
4 years agoFrequent Visitor
Sum the Amount and Get the Name
Hi everyone, Using DAX, how do I get the Salesperson name who has the least Sales Amount? Amount Name 3.984 Edward 3.1825 Denise 12.7415 John 3.992 Philips 12.7415 Edwar...
- Anonymous4 years ago
Hi yewling1201 ,
- Method1: Without DAX, just apply TopN filter to the Card visual:
- Method2: Using RANKX()
Rank = RANKX(ALL('Table'),CALCULATE(SUM('Table'[Amount]),ALLEXCEPT('Table','Table'[Name])),,ASC,Dense)who has the least Sales Amount = CALCULATE(MAX('Table'[Name]),FILTER('Table',[Rank]=1))Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi yewling1201 ,
- Method1: Without DAX, just apply TopN filter to the Card visual:
- Method2: Using RANKX()
Rank = RANKX(ALL('Table'),CALCULATE(SUM('Table'[Amount]),ALLEXCEPT('Table','Table'[Name])),,ASC,Dense)who has the least Sales Amount = CALCULATE(MAX('Table'[Name]),FILTER('Table',[Rank]=1))
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.