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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
rax99
Helper V
Helper V

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

@rax99 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

@rax99 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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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