Forum Discussion
Dynamic Row Numbers
- 10 years ago
Anonymous
You can first add an index column and then create a measure with following formula to get the dynamic row numbers.
RowNum = CALCULATE ( COUNT ( Table1[Index] ), FILTER ( ALLSELECTED ( Table1 ), Table1[Index] <= MAX ( Table1[Index] ) ) )Best Regards,
Herbert
Anonymous
You can first add an index column and then create a measure with following formula to get the dynamic row numbers.
RowNum =
CALCULATE (
COUNT ( Table1[Index] ),
FILTER ( ALLSELECTED ( Table1 ), Table1[Index] <= MAX ( Table1[Index] ) )
)
Best Regards,
Herbert
- RasikaOgale9 years agoFrequent Visitor
I also want to apply same in my project. I have created Index column and then applied mentioned formula, but isn't work.
- elads6 years ago
Helper III
Hi Anonymous ,
I tried to use your formula, but unfortunately it doesn't work (See attached image)
I am also attaching your formula, maybe I was wrong about something.
DynamicRowNumber =CALCULATE (count ( A_B[Index] ),FILTER ( ALLSELECTED ( A_B ), A_B[Index] <= MAX ( A_B[Index] ) )) - jl209 years ago
Helper IV
This doesn't work when sorting by a numeric measure (revenue, in your example). The formula does limit the numbers from 1 to number of displayed rows, but the Row numbers are not dynamic... Any ideas on how to fix?
- Anonymous7 years agoNot applicable
When i use this DAX to generate Current row number getting the error below when i added the measure to the table .please help me any ideas!

- Anonymous7 years agoNot applicable
Hi,
Can you please explain the logic you wrote in this measure?
Thanks in advance:manhappy:
- Anusha1Anusha3 years agoNew Member
Hi Herbert,
Is there a method to have this dynamic indexing calculate in columns as it is not supported to lookup values from the prior index of the column?
Thanks,
Anusha - ChielFaber2 years ago
Super User
Just found this solution while searching the forums. Works perfectly for me. Many thanks!