Are you using the dollar sign expansion, $(), to return the value of the variable in the table? e.g. =$(vRowNo)
where vRowNo=RowNo()
Although this will return the same row number value (likely 1) for each row of the table as storing it as a variable will hold it as the single definition you have defined.
What are you trying to achieve with this being stored as a variable? If you want to display the row number in the pivot table you can use RowNo() directly as a measure. If you want to return the row numbers as they are in the original data set you could look at creating a RowNo field in your load script.