Hi,
I am trying to incrementally count rows in a dataset based on matching conditions in three other columns. Essentially if the rows in Column A, B, and C match, then Column D = 1; when Column C changes (Depth) but Column A and B stay the same, Column D = 2. I need this count to restart from one when Column A (Site ID) or B (Year) change. I have gotten this far with the following formula:
Col Cumulative Sum( 1, :Site Code, :Year, :Depth )
This gives me the following:

Which is close, but I need Column D (Sample #) to look like this

My apologies if my explanation is unclear, but hopefully the pictures clarify what I mean.
Thanks!