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:from(Customer) pebblestream:sort("Last name":desc, "First name":asc, ...)
'Sort' can now be used with 'group' directive!
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!
Your spreadsheet will automatically take you to the output worksheet. See the results of grouping the data in your worksheet!
For more technical and in-depth information on our 'sort' directive, do visit our Pebble Stream Enterprise Documentation
Updated about 1 month ago