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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
robcrockford
Advocate I
Advocate I

Distinct Row Numbers based on Column value

Afternoon, 

 

I'm trying to ascertain whether it is possible to add a column that displays a sequential number for each row that has a duplicate reference. For example I have a column of references where it is possible to have multiple rows. I wish to append a number to each reference based on row count number:

 

 

ReferenceSeq RowAppended
1011101-1
1012101-2
1013101-3
1021102-1
1022102-2
1031103-1
1041104-1
1051105-1
1052105-2
1053105-3

 

Is this possible?

 

Thanks in advance

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

@robcrockfordYou can do this in the Query Editor

1) Group By

2) Add Custom Column {1..[Count]}

3) Expand to New Rows

4) Remove Column

5) Merge Column (Rename resulting column if you'd like)

6) Close & Apply

 

Sequential Numbers.gif

 

Hope this helps! Smiley Happy

 

View solution in original post

1 REPLY 1
Sean
Community Champion
Community Champion

@robcrockfordYou can do this in the Query Editor

1) Group By

2) Add Custom Column {1..[Count]}

3) Expand to New Rows

4) Remove Column

5) Merge Column (Rename resulting column if you'd like)

6) Close & Apply

 

Sequential Numbers.gif

 

Hope this helps! Smiley Happy

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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