Filtering Repeating Group dynamically based on departments following a specific ordre


In my original repeating group, I have a list of employees. Each of them belongs to a department (Marketing, Finance, HR…).
I would like to filter the database by department.
But I have a specific logic of sorting this data / department
(I want the “Marketing” label to be on the left, then right after “Finance”, then “HR”…)
Ideally I would like to set the right order myself for the sorting labels and then have the Repeating Group automatically displaying the right data based on the department I selected.

Given the fact that each cell in my Repeating Group is connected to other pages, I would like to rely on the same Repeating Group and not displaying several Repeating Groups based on conditions.

How could I do that ?
Thanks so much for your help.

Hard to visualize what you are imagining without a relevant image to reference as an example.

Seems like you want three columns. First column is Marketing, Second column is Finance and Third column is HR.

Seems like you need three repeating groups next to each other.