Forum Discussion

William_Moreno's avatar
6 years ago
Solved

count adding one to each count made

Hi everyone,

I have a table with the order code, as you see below, the code appears 3 times, I woud like to create a column to count without repeating the number "3", but count adding one to each count made. 

 

order-numberCountCorrect Count
10050050031
10050050032
1005005003 3


Thanks

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi William_Moreno ,

     

    One way would be

     

    Create an index Column in Power Query.

     

     

     

    Then create a  Calculated Column

     

    Correct Count Column = RANKX(FILTER('Table','Table'[order-number] = EARLIER('Table'[order-number])),'Table'[Index],,ASC,Dense)

     

     

     

     

    Regards,
    Harsh Nathani
    Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi William_Moreno ,

     

    One way would be

     

    Create an index Column in Power Query.

     

     

     

    Then create a  Calculated Column

     

    Correct Count Column = RANKX(FILTER('Table','Table'[order-number] = EARLIER('Table'[order-number])),'Table'[Index],,ASC,Dense)

     

     

     

     

    Regards,
    Harsh Nathani
    Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)