To add auto increment column we can use "RunningValue" function in SSRS.
To do this add below expression to the cell in the group you want to add auto increment column.
=RunningValue(<Value Field (Must be the grouped field)>,CountDistinct,"<DataSet>")
Example:-
=RunningValue(Fields!Name.Value,CountDistinct,"DataSet")
To do this add below expression to the cell in the group you want to add auto increment column.
=RunningValue(<Value Field (Must be the grouped field)>,CountDistinct,"<DataSet>")
Example:-
=RunningValue(Fields!Name.Value,CountDistinct,"DataSet")
use simple one
ReplyDeleteRownumber(nothing)
If there are distinct rows, 'Rownumber(nothing)' is repeat the row number.
Deletealso if you are using an aggregate function (SUM) and an order by that aggregate function at the tablix level your row numbers will not be sequential. But the above solution works for this
Deleterownumber(nothing) does not give you a row count, (like a rank column in the post), it counts the incidences, it is good for another purpose
Deleteworked for me . Thanks for posting
ReplyDeleteworked fine for me too. Thank you and keep going...
ReplyDeleteWorks great. I had to read about a dozen other posts before finding this simple solution. Thanks!
ReplyDeleteWorked 4 me! Ty
ReplyDelete