Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Ryanb2412
Helper I
Helper I

Ranking within a group

Hello,  I am trying to rank employees against each other within the same market they serve.  I am currently unable to get anything to work correctly besides comparing all employees against one another.

 

My current formula is: 

Total AR Rank = RANKX(ALL('EmployeeList'),[Total Achievement], , DESC)

 

 

This is how I want the data to display in my dashboard: 

MarketRank w/in MarketTotal AchievementEmployee
Nashville      198%John Doe
Nashville      242%Tom Smith
Baltimore      188%Jane Doe
Baltimore      277%Sam Smith
Baltimore      330%Jack White
1 ACCEPTED SOLUTION

Hi @Ryanb2412 ,

 

 

Try a measure

 

RankEmployee = RANKX(FILTER(ALL('Table'[Market], 'Table'[Employee]),'Table'[Market] = MAX('Table'[Market])),CALCULATE(SUM('Table'[Total Achievement])))
 
 
1.jpg
 
 
 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

6 REPLIES 6
GaloyanTelman
Regular Visitor

Rank By Groups

RANKX ( ALL ( Table[Employee] ),
    CALCULATE ( SUM ( Table[Total Achivment] ),
        ALLEXCEPT (
            Table,
            Table[Employee],
            Table[Market]
        ) ),
    ,
    DESC
)
harshnathani
Community Champion
Community Champion

Hi @Ryanb2412 ,

 

Total AR Rank = RANKX(Filter (ALL('EmployeeList'[Market]), EmployeeList[Market] = Max(EmployeeList[Market])),[Total Achievement]))

 

 

You can also see this blog

https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

 

Regards,

HN

Hi @Ryanb2412 ,

I suggest you follow the link

 

https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns

 

It is a 3 series blog on RankX

 

Regards,

HN

@harshnathani 

 

This just gives me all 1s for every employee when used as a measure or calculated column.  Any idea why that could be still?  Total Achievement is a measure also, rather than a column if that could play a factor.

Hi @Ryanb2412 ,

 

 

Try a measure

 

RankEmployee = RANKX(FILTER(ALL('Table'[Market], 'Table'[Employee]),'Table'[Market] = MAX('Table'[Market])),CALCULATE(SUM('Table'[Total Achievement])))
 
 
1.jpg
 
 
 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.