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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
chrisparker3268
Frequent Visitor

Simple Sequential rank / number column added to table

I have table 'Append 1' visual sorted by [% Compliant] and filtered on >=1 (100%) [% Delivered[. I want to rank these by % Compliant. I have tried the rankx function for a new mesure but get varying results. I cannot seem to get a simple out that ranks by % compliant.

 

Site% Compliant% Delivered# Non-Compliant
Chillicothe99.80%100%3
Des Moines99.40%100%12
White City99.20%100%9
Boise99.20%100%21
Portland98.40%100%90
Seattle98.30%100%122
Roseburg98.20%100%34
Northern Indiana98.00%100%53
Alaska97.60%100%32
Dayton97.40%100%86
Cincinnati97.30%100%96
Indianapolis97.30%100%119
Danville97.00%100%53
Ann Arbor96.40%100%163
Battle Creek95.90%100%101
Saginaw95.30%100%103
Salt Lake92.80%100%283
Sioux Falls92.00%100%138
Detroit91.10%100%252
Fort Harrison90.90%100%195
Cleveland90.60%100%675
North Chicago94.80%95%148
Iron Mountain92.10%94%97
Marion96.00%93%90
1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @chrisparker3268 ,

According to your description, in the visual filtered for [% Delivered]>=1, you want to create a measure to rank the %compliant. Here's my solution.

Rank =
RANKX (
    ALLSELECTED ( 'Table' ),
    CALCULATE ( SUM ( 'Table'[% Compliant] ) ),
    ,
    DESC,
    DENSE
)

Get the result.

vkalyjmsft_0-1653028935783.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @chrisparker3268 ,

According to your description, in the visual filtered for [% Delivered]>=1, you want to create a measure to rank the %compliant. Here's my solution.

Rank =
RANKX (
    ALLSELECTED ( 'Table' ),
    CALCULATE ( SUM ( 'Table'[% Compliant] ) ),
    ,
    DESC,
    DENSE
)

Get the result.

vkalyjmsft_0-1653028935783.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

lbendlin
Super User
Super User

You have duplicates in the data. The Rank function needs help deciding how to sort these. What is your expected outcome and why?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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