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
ukeasyproj
Helper II
Helper II

need help with rankx

Hey I am wondering if rankx can be used in the following case:

 

Basically I want to see the top 3 projects with the most logged hours for a given portfolio:

 

the final result should look like this:

 

Portfolio  | Project | Hours Logged

---------------------------------------

Portfolio 1 |  project 1 | 10000

---------------------------------------

Portfolio 1 |  project 8 | 5000

---------------------------------------

Portfolio 1 |  project 9 | 2000

---------------------------------------

Portfolio 2 |  project 0 | 15000

---------------------------------------

Portfolio 2 |  project 3 | 7000

---------------------------------------

Portfolio 2 |  project 11 | 2000

---------------------------------------

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@ukeasyproj

 

Use this dax:

 

Ranking =
RANKX (
    ALLEXCEPT ( Table1, Table1[Portfolio] ),
    CALCULATE ( SUM ( Table1[HoursLogged] ) ),
    ,
    DESC,
    DENSE
)

In visual level filter select

 

Sin título.png




Lima - Peru

View solution in original post

1 REPLY 1
Vvelarde
Community Champion
Community Champion

@ukeasyproj

 

Use this dax:

 

Ranking =
RANKX (
    ALLEXCEPT ( Table1, Table1[Portfolio] ),
    CALCULATE ( SUM ( Table1[HoursLogged] ) ),
    ,
    DESC,
    DENSE
)

In visual level filter select

 

Sin título.png




Lima - Peru

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.