Forum Discussion

sd22's avatar
sd22
Frequent Visitor
3 years ago
Solved

DAX - RankX Function

Hi All, Can we give a custom value in RANX function so that rank starts from a particular number instead of 1 ?

I want my Rank to start from 500 instead of 1.

The DAX that I'm using is 

index1 =
RANKX (
    FILTER (
        Sheet1,
        EARLIER ( Sheet1[First Characters])= Sheet1[First Characters]
        && EARLIER(Sheet1[Accounting Number]) <>  Sheet1[Accounting Number]
           
    ),
   Sheet1[Company Code],
    ,
    ASC,Dense
)

5 Replies

    • sd22's avatar
      sd22
      Frequent Visitor

      Hi Payeras,
      Sure 

      Regads,
      SD

    • sd22's avatar
      sd22
      Frequent Visitor

      Hi Payeras,

      It worked .
      Thanks a lot!!

    • sd22's avatar
      sd22
      Frequent Visitor

      Hi Payeras,

      While implmenting the logic I'm getting the below error saying "There is not enough memory to complete this operation. PLease try again later". As the table has more than 7.6 Million rows and I have also tried it through creating summarize table. The summarize table has also got more than 600K records and it shows the same error . Can you help me regarding this ?





       

      Regards
      SD

  • sd22's avatar
    sd22
    Frequent Visitor

    Hi All,

     

    I have a column named pp having numeric values 0 till 12. This pp column is acting as a slicer. If I select any value say 5 from the pp slicer then I want to have a calculated column which will contain values 0,1,2,3,4,5 in a row wise fashion. Can anyone help me with the dax plase ?

     

    Thanks & Regards

    Sd22