Define the order of your results

0
(0)

As you may know, Wave sorts your step/lens results automatically. By default results are sorted alphabetically or small to large if the grouping contains numeric values. And you have probably already found your way to the gear icon when creating your steps or lenses. Here you can order your results ascending or descending, a simple way to get top accounts, top sales reps, top cases etc. However, what if you want to see results by weekday? Even though it would be great to have Saturday after Monday, it is sadly not the case in real life.

In order to read the results easily, it would be great if the order was as the days actually appear. But as you might know, there is not possibility to define this in the UI. As Wave naturally sorts numeric values small to large, a simple solution is to add 01, 02, 03 […] in front of each weekday. This way Wave will sort correctly.

On a side note, there are different ways to get the numbers added to the weekday in Wave; recipes, formula field in Salesforce or during the transformation of data in 3rd party tool. Which way to choose will depend on the situation.

Anyway, as you might agree, this doesn’t really look that nice. Users do not normally see 01 in front of Monday or 02 in front of Tuesday. Well, we can change what the user gets displayed in the XMD of the dataset.

If you don’t already have Wave Labs installed I would strongly recommend installing it – while we wait for Wave to someday maybe have XMD modification capabilities built in natively.

Open Wave Labs’ tool XMD Editor in Salesforce and open your dataset. Now select the “Dimensions” tab to the left and find your weekday column. Click “+ Value”  next to the “members” parameter. In the “member” field type “01 Monday” and in the “label” field type “Monday”. You can, if you wish, define a color for this value, however, I have left this blank.

Click the “+ Value” again and repeat the steps for Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday. Finally, save the XMD file.

Going back to your lens, you will see the numbers have been removed from the weekdays, but the correct order has been maintained making the lens more reader friendly.

How useful was this post?

Click on a star to rate useful the post is!

Written by


1 thought on “Define the order of your results”

  • 1
    Pankaj on March 22, 2023 Reply

    Hi Rikkie,

    Wave labs is replaced by XMD but still I am not able to achieve it. Any suggestions please?

    Thanks,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.