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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
SENQLDHLTH
Frequent Visitor

Rank by Project

Hi All

I am struggling to create a measure which deliver the information I need. The idea is to provide a list with a dynamic ranking by project. These projects should be ranked by the amount in each one of them for a specific period. Also, I will need that any Category that is filtered impact on this, more specifically:

Overall this should be the ranking (no filters applied):

SENQLDHLTH_0-1682556250207.png

Now filtering by date, between Mar23 and Sep24 should llok like this

SENQLDHLTH_1-1682556487990.png

Finally, with one category selected should look like this (keeping the ranking for the period selected). Filters applied are: Category 3 and period between March 23 and September 2024

SENQLDHLTH_2-1682556768288.png

I have tried this 

Category Rank =
    -- 3. Rank my expression against the sorted list from 2.
    RANKX(
       ALLSELECTED('Table'[Project]) ,
        CALCULATE(SUM('Table'[Amount]),ALLEXCEPT('Table','Table'[Project])
            ),,DESC,Dense
       )
 
And many combinations including filters for specific dates and all selected within the filter for the sum, but it is not working
Data looks as follows
SENQLDHLTH_3-1682557576921.png
I hope someone can asisst
 
Thanks in advance
2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

These measures should work

Total = SUM('Table'[Amount])

Rank = rankx(all('Table'[Project]),[Total])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.