Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Duplicated values, Diff outcome

Hello,

 

I want to know how to give duplicated values different outcome, eg: "A" is duplicated value, I want the outcome to be "A1", "A2"

 

Thanks

  • Hi Anonymous ,

     

    We can create a calculate column to meet your requirement.

     

    1. We need to add an index column in Power Query Editor.

     

     

    2. Then we can create a calculate column.

     

    outcome Column = 
    var _group_rank = RANKX(FILTER('Table',EARLIER('Table'[Name])='Table'[Name]),'Table'[Index],,ASC,Dense)
    return
    'Table'[Name]&""&_group_rank

     

     

    If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?

    BTW, pbix as attached.

     

    Best regards,

     

    Community Support Team _ zhenbw

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • You can add index columns in Power Query to make each row unique. You can also concatenate your data column with the index column if that's desired.

  • v-zhenbw-msft's avatar
    v-zhenbw-msft
    Community Support

    Hi Anonymous ,

     

    We can create a calculate column to meet your requirement.

     

    1. We need to add an index column in Power Query Editor.

     

     

    2. Then we can create a calculate column.

     

    outcome Column = 
    var _group_rank = RANKX(FILTER('Table',EARLIER('Table'[Name])='Table'[Name]),'Table'[Index],,ASC,Dense)
    return
    'Table'[Name]&""&_group_rank

     

     

    If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?

    BTW, pbix as attached.

     

    Best regards,

     

    Community Support Team _ zhenbw

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.