You need to set the scope of the function as the name of the group, not the DataSet, something like:
=RowNumber("Group1")
Edit after comment:
As above this is the name of the group created in the report, not any of the values in the DataSet.
In Designer:
Group properties: