View sorting by two sorting criterias


I have made a view displaying all the people working at my Experiment and wanted it to be orderd by first Affiliation (name of the university) and second the name. Affiliation is a taxonomy field, surname is a plain text field for sorting, which is not displayed (only exists for the view sorting).

However, it only sorts for one of the sorting criterias. Either it shows me the right affiliation order or the right surname order.
So my question will be why does it do that and how can I get it right?


Hello Nadine,

I think the problem is that it never sorts by affiliation. As you mention, the first sorting factor is a taxonomy. But you need to specify the specific factor of the taxonomy vocabulary that you want it to sort. Is it the name of the terms? Is it the creation date? The order of the taxonomy terms?

Drupal by default does not understand the factor if you dont specify it. In order to do that you need to setup a relationship in your view to the taxonomy vocabulary that you want to sort by. You can have a look on a topic where I answered how to sort by order of taxonomy terms. In a similar way you should create a relationship and then add the sorting factor from the taxonomy vocabulary.

Let me know if it is clear. Also if it does not work, please specify the view URL to have a better look.


Hello Konstantinos,

it sorts by affiliation name, but within the affiliation not by name of the person. I’ve tried your suggestion from the other topic. Step 1 worked. But…

I can’t find the Taxonomy term: Weight. Do I need a special module installed?

Here’s the link to the view.


No you do not need. I just searched in your sort criteria and found it so just search for weight and you should find it. Dont forget to add the relationship in the sorting criterion.


Oh, perfect, it works now! Thank you!