Linked fields are always considered to be a list of items, even if they only contain one item. This is why the concat() function does not directly works.
The solution is to convert the lookup values to a single text and concatenates those texts.
Yes, I just noticed. Now I got rid of the spaces and get the following error messag:
Error with formula: argument number 1 given to function join was of type single_select but the only usable type for this argument is a list of text values obtained from a lookup, argument number 1 given to function join was of type single_select but the only usable type for this argument is a list of text values obtained from a lookup.
Next problem, the blanc between the looked up items is weirdly put before the results, there is no blanc separating the results. The lookups may have more than one result, join(totext…) seems to be the reason why there is no blanc between them.
A lookup field shows all the corresponding values of the linked field. There is the filter() function that allows you to filter results based on a condition, but I don’t think it is possible to set up a condition that checks if a value occurs more than once.