Forum Discussion

SENQLDHLTH's avatar
SENQLDHLTH
Frequent Visitor
3 years ago

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):

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

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

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
I hope someone can asisst
 
Thanks in advance

2 Replies