Hi Jigs,
try this
=RunningValue( IIf(Fields!StepID.Value = 5, Nothing, Fields!StepID.Value)
, CountDistinct
, "Tablix1")
change the condition in IIF statement with the condition you used to hide the rows, if it doesn't work please provide me with the result set in details.
Regards,
Ahmad