cancel
Showing results for 
Search instead for 
Did you mean: 
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-kalyj-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-kalyj-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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors