Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
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.

 

du1.jpg

 

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

 

Du2.jpg

 

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.

View solution in original post

2 REPLIES 2
v-zhenbw-msft
Community Support
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.

 

du1.jpg

 

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

 

Du2.jpg

 

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.

lbendlin
Super User
Super User

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.