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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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