Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

How to make RANKX function rank based only on the first row group and exclude the other row groups

Hi, 

I have a rank function that needs to be calculated based only on Column1. Even if I add two or three other columns, the ranking should always be based on Column1. How can I ensure that my DAX formula ignores all columns except Column1 for ranking ? 

Note: Column1, Column2, and Column3 are from different dimension tables.

MEASURE :
RANK = 
VAR COLUMN1 =

      FILTER(

             ALL(D_COLUMN1_TABLE),

             CALCULATE( SUM(F_SCORE[SCORE]) ALL(D_COLUMN2_TABLE) ) <> 0

      )
RETURN

RANKX(

       COLUMN1, CALCULATE(MAX(D_COLUMN1_TABLE[NAME]))

       ,
       ,
       ASC,  
       Dense
)


This is the result i got:

 

 

2 Replies