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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Adding calculated row numbers to simple dataset

consider this basic table;

 

CustomerDateCallIDDesiredRowNumber
A20180109450041
A20180110545962
A20180111454453
A20180112422314
A20180112524545
A20180114546006
A20180127157197
B20180904546021
B20180904864412
B20180904546043
B20180915684874
B20180927546065
B20180929265446
C20180909546081
C20180909465842
C20180909546103
C20180930678664


I need the row numbers as per DesiredRowNumber as a calculated column. iv not included any other fields from the actual table because im only interested in ordering rows by the Date and by customer. It should be in the order of the date.

1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@Anonymous Please add an "Index" field in Power Query and then add the below logic as new column in Data pane.

 

Rno = RANKX(FILTER(Test145RowNo,Test145RowNo[Customer]=EARLIER(Test145RowNo[Customer])),Test145RowNo[Index],,ASC,Dense)

 image.png

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

1 REPLY 1
PattemManohar
Community Champion
Community Champion

@Anonymous Please add an "Index" field in Power Query and then add the below logic as new column in Data pane.

 

Rno = RANKX(FILTER(Test145RowNo,Test145RowNo[Customer]=EARLIER(Test145RowNo[Customer])),Test145RowNo[Index],,ASC,Dense)

 image.png

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors