Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Show category dynamically

Hi there,

 

I have a card in my report which shows the person with the highest referrals. My formula is:

 

Highest Referrals by Assessor = 
MAXX(
KEEPFILTERS(VALUES('GCRTDatabase'[Referring Assessor])),
CALCULATE([Total Referrals])
)

 

I want to show who the referring assessor is, either in this box, or in a separate box.

Help!


Jemma

  • So, perhaps something like:

     

    Highest Assessor = 

    VAR __table = VALUES('GCRTDatabase'[Referring Assessor])

    VAR __table1 = ADDCOLUMNS(__table,"__referrals",CALCULATE([Total Referrals]))

    VAR __max = MAXX(__table1,[__referrals])

    RETURN

    MAXX(FILTER(__table1,[__referrals]=__max),[Referring Assessor])

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    So, perhaps something like:

     

    Highest Assessor = 

    VAR __table = VALUES('GCRTDatabase'[Referring Assessor])

    VAR __table1 = ADDCOLUMNS(__table,"__referrals",CALCULATE([Total Referrals]))

    VAR __max = MAXX(__table1,[__referrals])

    RETURN

    MAXX(FILTER(__table1,[__referrals]=__max),[Referring Assessor])

    • Anonymous's avatar
      Anonymous
      Not applicable
      This worked, thanks so much! :-)