Forum Discussion
Anonymous
5 years agoNot applicable
DAX Challenge
Hi All, I have the following sales table where I need to find annual ranking of salesperson but there is a small complexity.... The ranking depends not only on number of annual car sales by t...
- 5 years ago
Anonymous , I chanced on this video and improved the measure; you might want to refer to it as well,
Annual Ranking = VAR __delta = MAX ( Sales[Date of Joining] ) RETURN RANKX ( ALLSELECTED ( Sales[EMPLOYEE_ID] ), CALCULATE ( SUM ( Sales[Annual Car Sales] ) * __delta + SUM ( Sales[Date of Joining] ), ALLEXCEPT ( Sales, Sales[EMPLOYEE_ID] ) ) )
CNENFRNL
5 years agoCommunity Champion
Anonymous , you might want to try
Annual Ranking =
RANKX (
ALLSELECTED ( Sales[EMPLOYEE_ID] ),
CALCULATE (
SUM ( Sales[Annual Car Sales] ) + SUM ( Sales[Date of Joining] ) / 10000,
ALLEXCEPT(Sales, Sales[EMPLOYEE_ID] )
)
)
Anonymous
5 years agoNot applicable
CNENFRNL I dont have my workstation currently, but will try this in office tomorrow and let you know if this works. Thanks so much for your help!
- CNENFRNL5 years agoCommunity Champion
Anonymous , I chanced on this video and improved the measure; you might want to refer to it as well,
Annual Ranking = VAR __delta = MAX ( Sales[Date of Joining] ) RETURN RANKX ( ALLSELECTED ( Sales[EMPLOYEE_ID] ), CALCULATE ( SUM ( Sales[Annual Car Sales] ) * __delta + SUM ( Sales[Date of Joining] ), ALLEXCEPT ( Sales, Sales[EMPLOYEE_ID] ) ) )- Anonymous5 years agoNot applicable
Thanks!