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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Index column based on duplicates

Hi,

 

I'd like to create an index column following the example below :

IDDATEINDEX
A2021-01-141

B

2021-01-152
C2021-01-152
D2021-01-152
E2021-01-163
F2021-01-163

If the date is the same than the previous row, keep the same index.

If the date is different of the previous one, increment index.

 

Does someone knows how to do that with Power Query ?

 

Thanks in advance

Best regards,

Cado

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

Make a table that just includes the date column .

Remove Duplicates.

Add Index Column.

---

Merge the 2 tables based on the date (returning the index column to the original table).

--

 

Let me know how it goes

View solution in original post

2 REPLIES 2
HotChilli
Super User
Super User

Make a table that just includes the date column .

Remove Duplicates.

Add Index Column.

---

Merge the 2 tables based on the date (returning the index column to the original table).

--

 

Let me know how it goes

Anonymous
Not applicable

Hi @HotChilli 

 

Thanks for your help, it works perfectly !

 

Have a nice day,

Cado

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.