If you make a dummy table called Get all Departments and add 1 record to it, it will be Record ID# = 1.
The make a relationships to your Departments table based on a formula field with a numeric formula of 1.
Then make a Combined text summary field on the relationship and it will give you the first 25 unique values. Then you can look that up from the Get All Departments table down to any table you need, using that same technique.
I would also first convert that Combined text summary field on the to a text field like this
List("\n",
Trim(Part($value,1,";")),
Trim(Part($value,2,";")),
Trim(Part($value,3,";")),
Trim(Part($value,4,";")),
Trim(Part($value,5,";")),
Trim(Part($value,6,";")),
Trim(Part($value,7,";")),
Trim(Part($value,8,";")),
Trim(Part($value,9,";")),
Trim(Part($value,10,";")),
Trim(Part($value,11,";")),
Trim(Part($value,12,";")),
Trim(Part($value,13,";")),
Trim(Part($value,14,";")),
Trim(Part($value,15,";")),
Trim(Part($value,16,";")),
Trim(Part($value,17,";")),
Trim(Part($value,18,";")),
Trim(Part($value,19,";")),
Trim(Part($value,20,";"))
Trim(Part($value,21,";")),
Trim(Part($value,22,";")),
Trim(Part($value,23,";")),
Trim(Part($value,24,";")),
Trim(Part($value,25,";")))