Forum Discussion

Janaya1's avatar
Janaya1
Frequent Visitor
1 year ago
Solved

Create new numeric column from Categorical column

Is there a way to create a new column from a categorical column that acts like a numerical reference that is unique for that category without creating an if then statement that lists each category or...
  • techies's avatar
    1 year ago

    Janaya1 please try this calculated column

     

    Categorical Value =
    VAR CategoryIndex =
        RANKX(
            ALL(Sheet1[Category]),  
            sheet1[Category],      
            , ASC, DENSE              
        )
    RETURN CategoryIndex