Please se the attached file. I am trying to join 2 workflows that I have mocked up. I created an "excel" solution so you have the end results that I am trying to achieve. Just not sure how to accomplish the final results.
I think the simplest way to do what you want is to use a Multi Row formula to create an 'Employee Number' for each row where the first one is assigned 1 and then numbered down from there within each group.
Then remove the sample tool and crosstab them all.
Finally, a dynamic rename to make the name match what you wanted.
Sample attached.
I would suggest you generate all the month values valid for each employee.
Once you have the month end dates it is easy to use a join to link it all together.
Have attached a sample of what I tried