Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

RANKX

Hi Everyone,

 

I would like to ask for help. I would like to RANK the Total Forecasted Amount (Total MRC Only) per Sales Person, but I'm not sure why its not working when using the SUMx and RANKx.

 

First, I total the amount of TotalMRC then I use that measure to RANK the sales person. But the Rank Number is off.

 

I attached screenshots on this post.

 

THANK YOU SO MUCH IN ADVANCE.

 

Arvin

  • Anonymous's avatar
    Anonymous
    8 years ago

    Anonymous,

    Create a measure using DAX below.

    NewRankMeasure = RANKX(ALLSELECTED(Opportunities),
        CALCULATE([TotalMRC],ALLEXCEPT(Opportunities,Opportunities[Sales Person])),,DESC,Dense)



    Regards,
    Lydia

2 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    HI Anonymous

     

    Try replacing ALL (Opportunities)

     

    with

     

    ALLSELECTED(Opportunities[Sales Person])

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous,

    Create a measure using DAX below.

    NewRankMeasure = RANKX(ALLSELECTED(Opportunities),
        CALCULATE([TotalMRC],ALLEXCEPT(Opportunities,Opportunities[Sales Person])),,DESC,Dense)



    Regards,
    Lydia