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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Sri_phani
Helper III
Helper III

Rank for DAX on Table with Slicer

Hi, 

 

I wanted to assign a rank to attainment on a table, attainment was created using the DAX expression. When I use the rank function 

 

Team Mapping relation - table

Attainment% - Dax function

Rank in Descending

 

Rank = RANKX(ALL('Team mapping relation'),[Attainment %],[Attainment %],DESC,Dense)
 
However the issue is, I have a slicer that slices based on Location but now ranking is assigned based on rows by ignoring the slicer. Can anyone help me to assign rank based on the slicer and values available in the table. 
 
Sri_phani_0-1673440089331.png

 

 
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Sri_phani 
Please try

Rank =
RANKX (
    ALLSELECTED ( 'Team mapping relation'[Remitly ID] ),
    [Attainment %],
    ,
    DESC,
    DENSE
)

View solution in original post

3 REPLIES 3
Sri_phani
Helper III
Helper III

@tamerj1 I just need small help, I need to apply conditional format the text column (attainment) which was created using DAX. 

 

I found this online, I guess this is wrong, can you please help me to apply formatting to DAX column

 

 

Status Background =
VAR _Status = SELECTEDMEASURENAME([Attainment %])
RETURN SWITCH(_Status,
"OS","Green",
"EE","Light Green"
)
Sri_phani
Helper III
Helper III

This is second time you are helping me on a day. Thank you very much.

 

tamerj1
Super User
Super User

Hi @Sri_phani 
Please try

Rank =
RANKX (
    ALLSELECTED ( 'Team mapping relation'[Remitly ID] ),
    [Attainment %],
    ,
    DESC,
    DENSE
)

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.