Sorting a table by a measure, by default

Hi all,


I know that tables can be sorted by anything you like at runtime, but I'd like to sort a table I have by a numeric value when the user first sees it. At the moment it is sorted by the dimension that is being used to group the data by default (which under other circumstances would be perfectly rational) however for our purposes we need to see things listed in order of their "score".


Since a picture is worth a thousand words, here's a picture:

Image title


What we need is for the data to be sorted via the second column (the inline bar chart thingy), which is based on a numeric field which is a score out of 100% (ignore the lines, they're irrelevant for this purpose). I can sort by that column easily enough in view mode by using the sorting tool, but it doesn't persist when I go back to edit mode, so it doesn't help. The columns must remain in the order specified here, so moving them around isn't an option (and I don't think it would help anyway, since the dashboard seems determined to sort this table based on a dimension and not any of the several measures that are available).


To be completely clear, the row with the longest bar should appear at the top, and they should proceed downward by score, so the order we're looking for in this example is London, Aberdeen, Manchester.


Any help appreciated.

Open the Data Analysis Panel and edit the Measure you would like to sort by.

Image title

Scrll to the bottom of the Configure Metric Set Element dialog and click Define custom measure sorting.

Image title

Change the Sort Direction to Descending and submit.

Image title


This will have the same result you see in View mode.

Image title


1 Like

Hi, thanks for this, unfortunately it hasn't solved the problem. The image you posted to illustrate the Define custom measure sorting dialog hasn't come through though, so possibly there's something in that that might illuminate things. I have noticed that your example only seems to include various measures, where mine has a dimension. Mine seems stubbornly unwilling to change from sorting by that dimension, whatever I do, the custom measure sorting hasn't had any effect at all.


In the custom measure sorting dialog there's a pair of dropdowns from which you can select an axis hierarchy and an axis hierarchy level. I can only select my dimension from this dropdown, it has no other content available, does that affect things?


Apologies if this is something simple I'm just not getting, but I remain confused and unsorted.


[EDIT] Panic over, you were correct, I humbly apologise. My metric set was not checked out, and rather than tell me about it, my changes simply weren't applied, so I didn't see any changes. Now I've checked it out and followed your steps things are working great! Thanks!

Been there, done that!

There is a message that the metric set is not checked out if you try to add/remove measures or hierarchies or change filters, but not if you try to sort.

Thanks for pointing this out, I brought this behavior up with the developers.