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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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