Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Using Multi Row formula to generate counter based on two creiteria

Ben020283
7 - Meteor

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 IDPay periodSub Check Counter
10970107/03/2023 - 07/05/20231
12015607/10/2023 - 07/16/20231
12015607/10/2023 - 07/16/20231
12015607/10/2023 - 07/16/20232
30335907/03/2023 - 07/07/20231
37109607/03/2023 - 07/06/20231
37244607/11/2023 - 07/16/20231
38530107/03/2023 - 07/10/20231
46071907/03/2023 - 07/05/20231
46461907/03/2023 - 07/10/20232
46461907/03/2023 - 07/10/20232
46461907/03/2023 - 07/10/20232
4 REPLIES 4
binuacs
20 - Arcturus

@Ben020283 What is the expected result?

Ben020283
7 - Meteor

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".

sergejs_kutkovics
9 - Comet

@Ben020283, try this example. I made MultiRow formula according to your text description. Hope it helps.

Ben020283
7 - Meteor

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.

Labels