The Salesforce Opportunity Product related list Sort drop-down doesn't appear to work when adding a custom lookup field. This article explains why, and what fields are sortable on this related list.
This article answers the question: why doesn't the Sort By drop-down work as expected on the Opportunity Product related list, and which fields can actually be sorted?
The Opportunity Product related list on any object is sorted by default based on Product Name. Sorting by another field isn't available for the standard related list, even though a Sort option is visible.
Select a field from the Sort By drop-down list to sort the items in the related list. Items display in ascending order unless you select Descending. The default sort order varies per record. The Sort By drop-down is not available for activities and opportunity products on the standard related list.
An IdeaExchange idea requesting this enhancement, Change sort order on opportunity product related list, has been delivered. Sorting is now available in Lightning Experience for the fields listed below.
For example, an admin who wants to sort the Opportunity Product related list by Quantity or Sales Price can now do so in Lightning Experience, but not by Product or List Price.
This behavior only applies to related lists with custom lookup fields. It's working as designed that the standard related list doesn't include the "Sort by" option.
000387660

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.