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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
sizi
Helper II
Helper II

DAX to define Overall rank based on 2different Ranks

Hello All,

 

I need to define rank for each employee based on average of 2 defined ranks.

 

Below is the original data:

EmployeeTaskRankSLAAvg(Task+SLA)
John232.5
claire423
Chris444
Rock264
Bella634.5
Harry714
Stefanie153

The result overall rank shall be based on Avg values:

EmployeeTaskRankSLAAvg(Task+SLA)Overall Rank
John232.51
claire4232
Chris4443
Rock2643
Bella634.54
Harry7143
Stefanie1532

 

Kindly help. Thanks in advance.

 

9 REPLIES 9
Anonymous
Not applicable

Hi @sizi ,

 

Try the following expression:

Rank = var _t = ADDCOLUMNS('Table',"Rank",RANKX(ALL('Table'),[AVG],,ASC,Dense))
RETURN MAXX(_t,[Rank])

vtianyichmsft_0-1705989212045.png

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Below is the data detaile data and how  the calculation is done. Task rank is defined based on total task ; Avg sla is sla complaint task against task qulaified for SLA out of Total task and the result is defined rank and then task rank + sla rank gives the overall avg which again is defined to get the final rank.

EmployeeTotal Task TaskRankTask Qualified for SLASLA Complaint Task out of QualifiedAvg of sla complaint Avg SLA rank Total Rank Avg (TaskRank+AvgSLARankFinal Rank
John2717342.85714286322
claire1645240444
Chris222548011.51
Rock145635023.55
Bella1166350246
Harry573133.33333333567
Stefanie193425022.53

It isnt working for me. Task rank, sla rank is all measure defined from measures. I dont know the dax doesnt work for me 😞

Anonymous
Not applicable

Hi @sizi ,

 

If you want to use measure, try it:

Measure = var _t = ADDCOLUMNS('Table',"Rank",RANKX(ALL('Table'),'Table'[Avg(Task+SLA)],,ASC,Dense))
RETURN MAXX(_t,[Rank])

 

vtianyichmsft_0-1705973386496.png

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

all the 3 columns are measures defined fyi.

It showing 1 for all the employees.

sizi_0-1705981974317.png

 

@sizi 

Use this measure:

Rank BA Avg = 
IF(
    ISINSCOPE( Table35[Employee]),
    RANKX( 
        ADDCOLUMNS( ALL(Table35) , "Avg" , [BA Avg] ),
        [BA Avg],,
        ASC,
        Dense
    )
)

 

Fowmy_0-1705988124922.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Fowmy
Super User
Super User

@sizi 

Create a caluclated Column:

Rank = RANKX( SUMMARIZE(ALL(Table),Table[Employee],Table[Avg(Task+SLA)]) ,Table[Avg(Task+SLA)] ,,ASC,Dense)





Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Avg column is a measure. The above dax is giving error because of that.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors