Forum Discussion

Morrison's avatar
Morrison
Icon for Helper I rankHelper I
3 years ago
Solved

How to add a Rank by multiple columns

Hello, how can I add lap number column in PowerQuery or in Dax? Tour number is based on store, date, area.  I am attaching an example of what I would like to overe in the column N Lap   Thx
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

    It is for creating a new column.

     

     

     

    N Lap CC =
    RANKX (
        SUMMARIZE (
            FILTER ( 'Table', 'Table'[Store] = EARLIER ( 'Table'[Store] ) ),
            'Table'[Date]
        ),
        'Table'[Date],
        ,
        ASC
    )