Monthly Top 5 Salesmen

Target

Find the salesmen whose sales are in top 5 each month according to the daily sales records in the database.

The original daily sales records of each salesman in the year are shown below:

esCalc_demo_monthly_salesmen_1

Find the top 5 salesmen per month, and then get their intersection, as shown below:

esCalc_demo_monthly_salesmen_2

1. Group data

First import data from the database through the wizard.

esCalc_demo_monthly_salesmen_3

To compute the monthly sales of each salesman, the data should be placed in two layers by month and salesman. So, append a column and get the month according to the dates as below:

esCalc_demo_monthly_salesmen_4

The result is:

esCalc_demo_monthly_salesmen_5

The formula has been automatically copied to the other cells. Then group by month as below:

esCalc_demo_monthly_salesmen_6

The result is:

esCalc_demo_monthly_salesmen_7

The “Quick operation” performs sort before group by default. The operation on the menu provides more options.

Next, let’s group by salesman. Select any cell in the detailed area of D column to perform the same operation as above, and we will get the following result:

esCalc_demo_monthly_salesmen_8

For the convenient observation of different data levels, row 2 and row 3 are marked with different colors as below:

esCalc_demo_monthly_salesmen_9

Data observation can be more intuitive when data collapses to show different levels as below:

esCalc_demo_monthly_salesmen_10

Here’s the table collapsed to level 1(month):

esCalc_demo_monthly_salesmen_11

You can see that the cell style can be automatically copied between the summary areas. In esCalc, automatic copying is dominant.

Before proceeding to the next step, let’s remove the extra A and B columns, and expand the data as below.

esCalc_demo_monthly_salesmen_13

2. Compute sales amount

The goal of this step is to compute the monthly sales of each salesman. For example, to compute Baker’s sales in January is to “add up the cells with the same month and same salesman as C4 (which are called homocells).” They are shown as follows:

esCalc_demo_monthly_salesmen_131

esCalc computes in this way. First, enter a formula:

esCalc_demo_monthly_salesmen_13

Then you get the following result:

esCalc_demo_monthly_salesmen_14

The formula means:

esCalc_demo_monthly_salesmen_15

It’s the characteristic of esCalc to intuitively write the formula according to business description. On the contrary, you need to define the starting and ending cells to write a similar formula with a traditional spreadsheet.

Next, collapse rows as follows:

esCalc_demo_monthly_salesmen_16

You can see the formula is automatically copied to C35, C67 and some other cells. They are homocells of C3 that have the same business position. Non-homocells won’t copy the formula, such as C2 and C325.

Traditional spreadsheets lack such intelligent formula copying and the same computations have to be done manually.
Let’s go on.

3. Sort data

We need to sort the salesmen by sales amount in this step.

Traditional spreadsheets cannot distinguish the summary area and the detailed area due to the lack of homocell model, and therefore cannot sort data straightforwardly and correctly, while esCalc handles sorting easily. Let’s perform a simple action:

esCalc_demo_monthly_salesmen_17

Here’s the result:

esCalc_demo_monthly_salesmen_18

You see that the subjects of the sorting are homocells of C35, and cells holding detailed data are not affected. Besides, cells from February to December are also also automatically sorted since they are homocells of C35. For the same operation, the traditional spreadsheets require a great deal of manual work.

4. Filter data

In this step, you need to filter out the top five salesmen in each month. This sounds simple, but it is not easy to perform with traditional spreadsheets since they haven’t the concept of intra-group sequence number. esCalc can easily achieve this. Let’s enter a simple filtering formula as below:

esCalc_demo_monthly_salesmen_19

Note: # represents a sequence number within the current group.

Here’s the filtering result:

esCalc_demo_monthly_salesmen_1

All the months are done!

Intra-group sequence numbers are one of the properties of homocells. It’s difficult for traditional spreadsheets to perform the operation in the same way because of the absence of homocell model.

5. Get the intersection

This step is to find out the salesmen who appeared in each month, that is, the intersection. First collapse the rows to highlight the candidate salesmen in each month.

esCalc_demo_monthly_salesmen_21

“{B3}” represents the homocells of B3. Here’s the result:

esCalc_demo_monthly_salesmen_1

And then compute their intersection. Enter a formula as below:

esCalc_demo_monthly_salesmen_1

Note: isect() is used for getting intersection.

Now we get the result as follows:

esCalc_demo_monthly_salesmen_24

Ultimately, we have found the most excellent salesmen.

And esCalc made it easily!

By contrast, you need lots of manual operations and complex formulas to accomplish the task with the prevailing spreadsheets that don’t support set operations.