Hi @Chandrasekaran R ,
You can probably achieve this by combining the logic of your two expressions.
Say you have a simple DataSet and a simple Tablix based on this:
Here, RowNum is calculated as:
=RunningValue(Fields!val1.Value, CountDistinct, "Tablix1")
Next, let's hide some rows using an expression based on the other two fields:
=IIf(Fields!val2.Value + Fields!val3.Value <> 0, False, True)
This breaks RowNum, but we can amend the expression to ignore the hidden rows. We do this by NULLing them out (i.e. for SSRS set as Nothing) - CountDistinct will not consider any Nothing values:
=RunningValue(IIf(Fields!val2.Value + Fields!val3.Value <> 0, Fields!val1.Value, Nothing)
, CountDistinct
, "Tablix1")
Now RowNum is ignoring the hidden rows as required:
The information comes from:https://stackoverflow.com/questions/18953301/ssrs-row-number-within-table-excluding-hidden-rows
Best Regards,
Joy
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.