PIM-1636: Allow sorting by metric value

Bug fix: [no]
Feature addition: [yes]
Backwards compatibility break: [no]
Unit test passes: [yes]
Behat scenarios passes: [yes]
Checkstyle issues: [no]*
ChangeLog updated: [no]
Fixes the following jira:
 - PIM-1636