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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.