Forum Discussion

elsteshepardo's avatar
elsteshepardo
Frequent Visitor
1 year ago
Solved

RANKX with Filter doesn't work

Hi all I'm currently struggling to work out a ranking issue I want to calculate the ranking score - but I only want to calculate it for 'open' scores.   I have 2 tables - 1 table contains the sco...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi ALL,
    Firstly  bhanu_gautam thank you for your solution!
    And elsteshepardo ,For this problem of yours, we have tried to improve the code a little bit to produce the desired effect you want, and we hope this solution can provide you with ideas!

    RankingFiltered = 
    VAR AssessmentRank = 
        RANKX(
            FILTER(
                ALL('Request Assessment'),  
                'Request Assessment'[TotalMinusEffort] > 0
                && RELATED('DS Requests'[Stage]) = "Open"  
            ),
            CALCULATE(SUM('Request Assessment'[TotalMinusEffort])),
            , DESC, DENSE
        )
    
    RETURN
    IF(
        MAX('Request Assessment'[TotalMinusEffort]) > 0 && MAX('DS Requests'[Stage]) = "Open", 
        AssessmentRank,
        BLANK()
    )
    

    If you have more recent questions, you can contact me at any time, I will reply to you as soon as I receive your message, I look forward to hearing from you!

    Hope it helps!

    Best regards,
    Community Support Team_ Tom Shen

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.