Forum Discussion

mazingazeta's avatar
mazingazeta
New Member
5 years ago
Solved

Help with DAX Measure (LOOKUPVALUE, TOPN, RANKX; MAX, Groupby)

Hello, I have the following question: I need the NAME of the Agent with the most amount per Customer. (the result should be : a - Hannes, b - fritz, c - mike). I tried and thinked a lot of different ...
  • camargos88's avatar
    5 years ago

    mazingazeta ,

     

    You can use these measures:

     

    _TotalAgent = SUMX(SUMMARIZE('Table', 'Table'[Agent], "Total", SUM('Table'[Amount])), [Total])
    
    _Rank = IF(HASONEVALUE('Table'[Agent]), RANKX(ALL('Table'[Agent]), [_TotalAgent],,DESC), BLANK())