Arrange rows by ascending or descending order

Use the"sort" directive to order rows of data by values in selected columns.

For instance, to sort the "Customer" worksheet rows by "Last name" descending with ties broken by "First name" ascending, place the following directive in a comment in the "OrderedByLastName" worksheet.

pebblestream:sort("Last name":desc, "First name":asc, ...)


'Sort' can now be used with 'group' directive!

View 'group' documentation to learn more

Adding 'sort' directive

Step 1: Click the "Add Directive" button on your dashboard

Step 2: Choose "sort"

Step 3: Select the worksheet you'd want to sort

This will be the worksheet you'll be sorting.

Step 4: Select the column(s) you'd like to sort & what you'd like to sort them by (ascending or descending order)

You can sort as many columns as you'd like by clicking the '+' button to add more sorts.

Step 5: Once you're happy with your selection, click 'Next' and proceed to the next screen

Step 6: Name your output worksheet

This will be where your output data from adding 'sort' will be.

Step 7: Once you've inputted your output worksheet name, you're ready to add the directive!

Voilà, success!

Your spreadsheet will automatically take you to the output worksheet. See the results of grouping the data in your worksheet!

What it'll look like on the spreadsheet

What it'll look like on the spreadsheet

For more technical and in-depth information on our 'sort' directive, do visit our Pebble Stream Enterprise Documentation

What’s Next