Forum Discussion
Row number in calculated table
Hi, How can I add row number in the Calculated table?
RANKX gives me the same number if the totals are the same.
21 Replies
- az38
Community Champion
- az38
Community Champion
Why?
after creating your calculated table to data model it appears in the right Fields Pane. the you can create a new measure in this table. So, Table1 is your calculated table, Column1 is a field that will determine index order
alternatively, you can use ADDCOLUMNS function over your statement that defines your calculated table. we will try to help you, if you share your table formula here
do not hesitate to give a kudo to useful posts and mark solutions as solution
- v-frfei-msft
Community Support
Hi gtamir ,
Here we go.
running total = CALCULATE ( SUM ( RunningTotalByMetupalim[TOTAL] ), FILTER ( RunningTotalByMetupalim, RunningTotalByMetupalim[Metupal Name] <= EARLIER ( RunningTotalByMetupalim[Metupal Name] ) ) )index_ = RANKX ( RunningTotalByMetupalim, RunningTotalByMetupalim[running total], , ASC, DENSE )- gtamir
Post Patron
Thanks v-frfei-msft but I don't understand the RunningTotal.
In my formula, I sort TOTAL first, and then Cumulative Total aggregates the totals. In your Running total it is not.
You sort the table by the name.
- v-frfei-msft
Community Support