Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Calculated column RANKX with multiple columns

Hi All,   As per the image below, I would like to create a calculated column (Rankx) to rank the top products at customer level. By doing so, I would then be able to create a calculated column ("To...
  • VahidDM's avatar
    VahidDM
    4 years ago

    Hi Anonymous 

    The problem is because of that change you did in the code, remove that SUM from line 4 in the code (based on the screenshot you sent)

     

    try this and don't change anything (copy past):

     

    Rankx = 
    RANKX (
        FILTER ( ALL ( 'Sales' ), [Customer] = EARLIER ( 'Sales'[Customer] ) ),
        [Sales],
        ,
        DESC,
        DENSE
    )

     

    Output:

     

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/