Welcome to Filemaker Peter. Two quick responses to help others (including me) address your query:
1. Can you post your file (use advanced editor to do this) or at least a screenshot of your relationship graph or layout or whatever else shows the issue (use the camera symbol to do this).
2. In future, don't use the text of your question as the subject line; try to distill the issue into a few words—sorting a portal with a calculated field, or something like that.