Jump to content
We have recently updated our Privacy Statement, available here ×

Row count with reset formula


Brian Goodyear 2

Recommended Posts

Source data has detail records that are ordered by the header record

 

 

 

 

HeaderId

DetailId

 

 

Row 1

AAA

1234

 

 

Row 2

AAA

2345

 

 

Row 3

AAA

3456

 

 

Row 4

BBB

2345

 

 

Row 5

BBB

3453

 

 

Row 6

BBB

2587

 

 

Row 7

BBB

989

 

 

 

 

I need to get a incremental row count for each grouping, resetting to 1 for each group and looking for a solution.

 

 

 

 

 

HeaderId

DetailId

Seqnum

 

 

Row 1

AAA

1234

1

 

 

Row 2

AAA

2345

2

 

 

Row 3

AAA

3456

3

 

 

Row 4

BBB

2345

1

 

 

Row 5

BBB

3453

2

 

 

Row 6

BBB

2587

3

 

 

Row 7

BBB

989

4

Link to comment
Share on other sites

×
×
  • Create New...