Overview
Problem
If you set Row Height in Condition Attribute to hide rows in the expanded data, the previously arranged row serial numbers will become disordered. For example, if you hide the data of California, the serial numbers of the hidden rows will also be hidden, resulting in discontinuous numbering, as shown in the following figure.

Solution
Solution one: You can set a serial number formula under Condition Attribute > New Value.
Solution two: You can set a filter condition to display the required data, and then insert a serial number formula.
Template Preparation
Data Preparation
Create a general report, and create a database query ds1 with the SQL statement SELECT * FROM Sales_Volume.

Report Design
1. Enter Serial Number into cell A1, leave cell A2 blank, and drag required dataset fields into the table. The following figure shows the table style.

2. Select cell A2, set Expansion Direction to Vertical, and set Left Parent Cell to B2, as shown in the following figure.

3. Select cell B2 and set Data Setting to List, as shown in the following figure.

Solution One
Row Hiding
Select cell B2, click the icon next to Add Condition, set Row Height to 0 mm, and add the condition currentValue Equal to 'California', as shown in the following figure.

Setting a Serial Number Condition Attribute
You can directly insert the formula seq() into cell A2 to generate serial numbers when rows are not hidden. However, you need to delete the original formula when rows are hidden by the condition set under Condition Attribute > New Value.
Set New Value to Formula seq(), and set the condition to Formula 2<>"California" (which indicates that the value of cell B2 is not equal to California), as shown in the following figure.

Solution Two
Inserting a Serial Number Formula
Insert the formula seq() into cell A2, as shown in the following figure.

Setting a Filter Condition
Double-click cell B2, and set a filter condition to obtain the data in New York, as shown in the following figure.

Effect Display
1. PC
Save the report and click Pagination Preview. The following figure shows the preview effect.

2. Mobile Terminal
The report can be previewed on both the DataAnalyst app and the HTML5 terminal. The following figure shows the effect.

Template Download
For details about solution one, you can download the template Serial Number Continuity After Row Hiding - Solution One.cpt.
For details about solution two, you can download the template Serial Number Continuity After Row Hiding - Solution Two.cpt.