Skip to main content

Sort by Sum for data sources other than NAV

When working with a data source other than Dynamics NAV (for example, a SQL database), sorting by the Sum of a field is quite simple.

Let's assume the following data is in the DEPT table of our database:

table.png

and we want to list our department numbers, sorted by the decreasing value of the sum of the Amount field.

Our functions would look like this:

sort_functions.png

with the results of:

results.png

Was this article helpful?

We're sorry to hear that.