I have a data with Emp ID and pay period. I need to add a counter column to count non similar EMP ID and pay period. for next EMP ID the counter should start again from 1. below is the sample data that I sorted in Ascending order first by EMP ID then by pay period. And I need result as in sub Check Counter. For each EMP ID counter needs to start from 1 as the period changes it should add 1 and continue same number until period changes. If EPM ID changes the counter should again start from 1. I tried using Multi Row formula however I am not getting the desired result. Can anyone help me on this.
Employee ID | Pay period | Sub Check Counter |
109701 | 07/03/2023 - 07/05/2023 | 1 |
120156 | 07/10/2023 - 07/16/2023 | 1 |
120156 | 07/10/2023 - 07/16/2023 | 1 |
120156 | 07/10/2023 - 07/16/2023 | 2 |
303359 | 07/03/2023 - 07/07/2023 | 1 |
371096 | 07/03/2023 - 07/06/2023 | 1 |
372446 | 07/11/2023 - 07/16/2023 | 1 |
385301 | 07/03/2023 - 07/10/2023 | 1 |
460719 | 07/03/2023 - 07/05/2023 | 1 |
464619 | 07/03/2023 - 07/10/2023 | 2 |
464619 | 07/03/2023 - 07/10/2023 | 2 |
464619 | 07/03/2023 - 07/10/2023 | 2 |
Solved! Go to Solution.
@Ben020283 What is the expected result?
Expected result is as per the screen shot. I manually added the column and filled the numbers as required. My data has just 2 columns. Employee ID and pay period. The workflow needs to generate Third column "Sub Check Counter".
@Ben020283, try this example. I made MultiRow formula according to your text description. Hope it helps.
It was not exactly what I wanted however helped me in correcting my Multi Row Formula. I Changed it to
IF [Employee ID] !=[Row-1:Employee ID] OR [Pay Period] != [Row-1:Pay Period] then 1 else [Row-1:count] +1 ENDIF
this formula worked and solved my issue.