Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Ranking Issues with Measures

 

I would like to create a Top 5 and Bottom 5 ranking based off of a Measure that is interactive based off of the filter selections.

 

A picture is posted below(Dummy Data).. That I will further explain

 

 

So in the table I have a Market Column which is in my "Geography" Table and I have a category column which is in my "Retailer Table"... POS USD TY and POS USD LY are both measures (Foreign Currency/USD Conversion Rate) ... IYA is another measure that is taking POS USD TY / POS USD LY *100... I would like to have another column that ranks The Top 5 IYA's and Bottom 5 IYA's...

 

As I choose my time filter -- Last Week ,Last 4 Weeks, Last 52 Weeks I want the table and ranking systems to change based off selections. Currenlty I'm stuck and don't know what formula to use..  TOPN as a visual filter does not work .. I know I need a Rankx formula.. Please help!!!

18 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Perhaps something along the lines of:

     

    MyRankTop = RANKX(ALLSELECTED('Table'),[IYA],[IYA],DESC)
    
    MyRankBottom = RANKX(ALLSELECTED('Table'),[IYA],[IYA],ASC)
    
    IsTop5 = IF([MyRankTop]<=5,1,0)
    
    IsBottom5 = IF([MyRankBottom]<=2,1,0)
  • Anonymous's avatar
    Anonymous
    Not applicable

    I would like to create a Top 5 and Bottom 5 ranking based off of a Measure that is interactive based off of the filter selections.

     

    A picture is posted below(Dummy Data).. That I will further explain

     

     

     

    So in the table I have a Market Column which is in my "Geography" Table and I have a category column which is in my "Retailer Table"... POS USD TY and POS USD LY are both measures (Foreign Currency/USD Conversion Rate) ... IYA is another measure that is taking POS USD TY / POS USD LY *100... I would like to have another column that ranks The Top 5 IYA's and Bottom 5 IYA's...

     

    As I choose my time filter -- Last Week ,Last 4 Weeks, Last 52 Weeks I want the table and ranking systems to change based off selections. Currently I'm stuck and don't know what formula to use..  TOPN as a visual filter does not work .. I know I need a Rankx formula.. Please help!!!

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hello,

         

        Ashish_Mathur What is the best way to share the file with you ?

         

        Thanks,

         

        Garrett Gilmore