Forum Discussion
Anonymous
7 years agoNot applicable
Adding calculated row numbers to simple dataset
consider this basic table;
| Customer | Date | CallID | DesiredRowNumber |
| A | 20180109 | 45004 | 1 |
| A | 20180110 | 54596 | 2 |
| A | 20180111 | 45445 | 3 |
| A | 20180112 | 42231 | 4 |
| A | 20180112 | 52454 | 5 |
| A | 20180114 | 54600 | 6 |
| A | 20180127 | 15719 | 7 |
| B | 20180904 | 54602 | 1 |
| B | 20180904 | 86441 | 2 |
| B | 20180904 | 54604 | 3 |
| B | 20180915 | 68487 | 4 |
| B | 20180927 | 54606 | 5 |
| B | 20180929 | 26544 | 6 |
| C | 20180909 | 54608 | 1 |
| C | 20180909 | 46584 | 2 |
| C | 20180909 | 54610 | 3 |
| C | 20180930 | 67866 | 4 |
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.
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)
1 Reply
- PattemManohar
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)