Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

How to create a Ranking column in data table based on multiple categories

Hi, I need to create a Ranking Column based on 2 categories, (Description_Task and Approval_Date) for each NSRNUM as displayed below. I created a calculated column using DAX. But that doesn't give t...
  • Jihwan_Kim's avatar
    2 years ago

    Hi, I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.

    Please check the below picture and the attached pbix file.

    It is for creating a new column.

     

     

    RANK function (DAX) - DAX | Microsoft Learn

     

    expected result calculated column =
    RANK (
        SKIP,
        data,
        ORDERBY ( data[approval_date], ASC ),
        ,
        PARTITIONBY ( data[nsrnum], data[description_task] ),
        MATCHBY ( data[nsrnum], data[description_task], data[approval_date] )
    )