Be carried out according to several criteria at once. Evaluation of the operation on several indicators. Integral criteria: assessment of the quality of ecosystems by several indicators


Let's assume that you have the following report on the sales of sales representatives:

From it you need to find out how much pencils sold by sales representative Ivanov V January.

PROBLEM: How to summarize data by multiple criteria??

SOLUTION: Method 1:

BDSUMM(A1:G16;F1;I1:K2)


In English version:

DSUM(A1:G16,F1,I1:K2)


HOW IT WORKS:


From the database we specified A1:G16 function BDSUMM retrieves and sums column data Quantity(argument " Field" = F1) according to the given in cells I1:K2 (Seller = Ivanov; Products = Pencils;Month = January) criteria.

CONS: The list of criteria should be on the sheet.

NOTES: The number of summation criteria is limited by RAM.

APPLICATION AREA
: Any version of Excel

Method 2:

SUMPRODUCT((B2:B16=I2)*(D2:D16=J2)*(A2:A16=K2)*F2:F16)


In English version:

SUMPRODUCT((B2:B16=I2)*(D2:D16=J2)*(A2:A16=K2)*F2:F16)

HOW IT WORKS:

The SUMPRODUCT function generates arrays of TRUE and FALSE values, according to selected criteria, in Excel memory.

If the calculations were performed in the cells of the sheet (for clarity, I will demonstrate the entire operation of the formula as if the calculations were taking place on the sheet, and not in memory), then the arrays would look like this:

It is obvious that if, for example, D2=Pencils, then the value will be TRUE, and if D3=Folders, then FALSE (since the product selection criterion in our example is the value Pencils).

Knowing that TRUE is always equal to 1 and FALSE is always equal to 0, we continue to work with arrays as with the numbers 0 and 1.
Multiplying the obtained values ​​of the arrays with each other sequentially, we get ONE array of zeros and ones. Where all three selection criteria were met, ( IVANOV, PENCILS, JANUARY) i.e. all conditions were TRUE, we get 1 (1*1*1 = 1), but if at least one condition was not met, we get 0 (1*1*0 = 0 ; 1*0*1 = 0 ; 0*1* 1 = 0).

Now it remains only to multiply the resulting array by the array containing the data that we need to sum up as a result (range F2:F16) and, in fact, sum up what is not multiplied by 0.

Now compare the arrays obtained with the help of the formula and with the step-by-step calculation on the sheet (highlighted in red).

I think everything is clear :)

MINUSES: SUMPRODUCT - "heavy" array formula. When calculating on large data ranges, the recalculation time increases noticeably.

NOTES

APPLICATION AREA: Any version of Excel

Method 3: Array Formula

SUM(IF((B2:B16=I2)*(D2:D16=J2)*(A2:A16=K2),F2:F16))


In English version:

SUM(IF((B2:B16=I2)*(D2:D16=J2)*(A2:A16=K2),F2:F16))

HOW IT WORKS: Just like Method #2. There are only two differences - this formula is entered by pressing Ctrl+Shift+Enter instead of just pressing Enter and the array of 0's and 1's is not multiplied by the summation range, but is selected using the IF function.

MINUSES: Array formulas when calculating on large data ranges noticeably increase the recalculation time.

NOTES: The number of processed arrays is limited to 255.

APPLICATION AREA
: Any version of Excel

Method 4:

SUMIFS(F2:F16,B2:B16,I2,D2:D16,J2,A2:A16,K2)

13.12.5. Integral criteria: assessment of the quality of ecosystems by several indicators

Water quality classes according to hydrobiological and microbiological indicators are determined by the "Rules for monitoring the quality of water in weirs and streams" [GOST 17.1.3.07–82], which regulate the content of monitoring programs for hydrological, hydrochemical and hydrobiological indicators, the frequency of monitoring, as well as the designation and location of sampling points
(Table 13.7). According to this document, the degree of water pollution is assessed taking into account the saprobity index according to Pantle and Bukk in the modification of Sladechek, the Goodnight-Whitley and Parele oligochaete index, the Woodiwiss biotic index and the traditional set of microbiological indicators

Integral indicator according to E.V. Balushkina was developed and used to assess the state of ecosystems in water bodies subject to mixed organic and toxic pollution. Passed extensive testing in the system of Lake Ladoga - r. The Neva is the eastern part of the Gulf of Finland (Balushkina et al., 1996). The integral indicator IP is calculated by the formula:

IP \u003d K 1 * S t + K 2 * OI + K 3 * K ch + K 4 / BI,

where S t is the saprotoxity index of V.A. Yakovlev (K 1 = 25); OI is the Goodnight and Whitley oligochaete index, equal to the ratio of the number of oligochaetes to the total number of zoobenthos in percent (K2 = 1); Kch is Balushkina's chironomid index (K3 = 8.7); 1 / BI is the reciprocal of the Woodiwiss biotic index (K 4 @ 100).

E.V. Balushkina believes that the integral indicator she received included all best features parental indices and takes into account the characteristics of benthic communities as much as possible: the presence of indicator species of saprobotoxness, the ratio of indicator groups of animals of a higher taxonomic rank, the degree of dominance of individual groups and the structure of the community as a whole.

The combined index of the state of the community according to A.I. Bakanov. When assessing the state of benthic communities in a number of rivers, lakes and reservoirs in Russia, the author used the following indicators to quantify the state of benthos: number (N), ind./m 2 ; biomass (B), g/m 2 ; number of species (S); species diversity according to Shannon (H), bit/spec.; oligochaete Parele index (OIP, %), equal to the ratio of the number of tubificid oligochaetes to the total number of benthos, average saprobity (SS), calculated as the weighted average saprobity of the first three benthic organisms dominant in abundance. To combine the values ​​of the listed indicators and replace them with a single number, the resulting indicator is proposed - the combined index of the state of the community (KISS; [Bakanov, 1997]), found by the usual method of calculating integral rank indicators:

where R i is the rank of the station according to the i-th indicator, P i is the "weight" of this indicator, k is the number of indicators.

First, all stations are ranked by each indicator, and rank 1 is assigned to the maximum values ​​of N, B, H, and S. If at several stations the values ​​of any indicator were the same, then they were characterized by one average rank. The article gives different versions of the final formula (4.22) (we emphasize that the formulas do not include the absolute values ​​of the indicators, but their ranks):

KISS = (2B + N + H + S) / 5, where the biomass is given a "weight" equal to 2, since the magnitude of the energy flow passing through the community is associated with it, which is extremely important for assessing its state;

KISS = (2SS + 1.5OIP + 1.5B + ​​N + H + S)/8, where it is believed that the average saprobity is most closely related to pollution.

The smaller the value of KISS, the better the state of the community.

Since the state of the community depends both on natural environmental factors (depth, soil, currents, etc.) and on the presence, nature and intensity of pollution, the combined pollution index (CPI; [Bakanov, 1999]) is additionally calculated, including rank values three indicators:

KIZ \u003d (SS + RIP + B) / 3. (4.23)

The ranking of indicators is carried out in the reverse order (from the minimum values ​​to the maximum)

KISS and KIZ are relative indices that rank stations on a scale in which the best condition of the community according to the selected set of indicators is characterized by the minimum values ​​of the indices, the worst – by the maximum. In addition to the values ​​characterizing the values ​​of indicators at a particular station, their average values ​​are calculated for the entire set of stations. The variation of the index values ​​at individual stations relative to the average makes it possible to judge whether things are worse or better at them compared to the general trend.

The calculation of the Spearman rank correlation coefficient between the values ​​of KISS and KIZ shows how much pollution affects the state of zoobenthos communities. If there is a significant positive correlation between the values ​​of these indices, then the state of benthic animal communities is largely determined by the presence of pollution (otherwise, it is determined by natural environmental factors).

Previous

1. In an additional column in which we will indicate the rating, insert the RANK function (write in the cell = RANK and select the proposed EXCEL function from the list, click fx in the formula bar)


2. Fill in the arguments in the window that opens: "Number" - specify the first value in our table in the same line where the formula is located.


3. "Link" - specify the entire array of data, i.e. range with all numbers (sales values).


4. We fix the boundaries of this range (press F4 on the keyboard) so that when dragging in the future, the address of the range does not “move out” and press OK.


5. We extend the formula to all cells of the "rating" column down.


When using this function, the rating is calculated automatically, and if you change any value, then the rating will be automatically recalculated.

If you liked the material or even found it useful, you can thank the author by transferring a certain amount using the button below:
(to transfer by card, click on VISA and then "transfer")

In the second part of our tutorial on the function VLOOKUP(VLOOKUP) in Excel, we will analyze a few examples that will help you direct all the power VLOOKUP to solve the most ambitious Excel tasks. The examples assume that you already have a basic knowledge of how this function works. If not, you might be interested in starting with the first part of this tutorial, which explains the syntax and basic usage. VLOOKUP. Well, let's get started.

Search in Excel by multiple criteria

Function VLOOKUP in Excel is a really powerful tool for performing searches for a particular value in a database. However, there is a significant limitation - its syntax allows you to search for only one value. What if you want to search by multiple conditions? You will find the solution below.

Example 1: Search by 2 different criteria

Suppose we have a list of orders and we want to find Quantity of goods(Qty.), based on two criteria - Client name(Customer) and The product's name(Product). The matter is complicated by the fact that each of the buyers ordered several types of goods, as can be seen from the table below:

regular function VLOOKUP will not work in this scenario because it will return the first value it finds that matches the given lookup value. For example, if you want to know the quantity of an item Sweets ordered by the buyer Jeremy Hill, write the following formula:

VLOOKUP(B1,$A$5:$C$14,3,FALSE)
=VLOOKUP(B1,$A$5:$C$14,3,FALSE)

- this formula will return the result 15 corresponding to the product apples, because it's the first value that matches.

There is a simple workaround - create an additional column in which to combine all the desired criteria. In our example, these are the columns Client name(Customer) and The product's name(Product). Don't forget that the merged column must always be the leftmost column in the search range, since it is the left column that the function VLOOKUP looks up when looking for a value.

So, you add an auxiliary column to the table and copy the following formula over all its cells: =B2&C2. If you want the string to be more readable, you can separate the combined values ​​with a space: =B2&” “&C2. After that, you can use the following formula:

VLOOKUP("Jeremy Hill Sweets",$A$7:$D$18,4,FALSE)
=VLOOKUP("Jeremy Hill Sweets",$A$7:$D$18,4,FALSE)

VLOOKUP(B1,$A$7:$D$18,4,FALSE)
=VLOOKUP(B1,$A$7:$D$18,4,FALSE)

Where is the cell B1 contains the concatenated value of the argument lookup_value(lookup_value) and 4 - argument col_index_num(column_number), i.e. the number of the column containing the data to be retrieved.

Example 2: VLOOKUP by two criteria with table being viewed on another sheet

If you need to update the main table (Main table) by adding data from the second table (Lookup table), which is located on another sheet or in another Excel workbook, then you can collect the desired value directly in the formula that you insert into the main table.

As in the previous example, you will need an auxiliary column in the Lookup table with the combined values. This column must be the leftmost column in the search range.

So the formula with VLOOKUP could be like this:

VLOOKUP(B2&" "&C2,Orders!$A&$2:$D$2,4,FALSE)
=VLOOKUP(B2&" "Orders!$A&$2:$D$2;4;FALSE)

Here, columns B and C contain customer names and product names, respectively, and the link Orders!$A&$2:$D$2 defines a table to look up in another sheet.

To make the formula more readable, you can give the view range a name, and then the formula will look much simpler:

VLOOKUP(B2&" "&C2,Orders,4,FALSE)
=VLOOKUP(B2&" "Orders;4;FALSE)

For the formula to work, the values ​​in the leftmost column of the table being viewed must be combined in the same way as in the search criteria. In the figure above, we combined the values ​​\u200b\u200band put a space between them, just like you need to do in the first argument of the function (B2&” “&C2).

Remember! Function VLOOKUP limited to 255 characters, it cannot search for a value that is more than 255 characters long. Keep this in mind and make sure that the length of the desired value does not exceed this limit.

I agree that adding an auxiliary column is not the most elegant and not always acceptable solution. You can do the same without the helper column, but that would require a much more complex formula with a combination of functions INDEX(INDEX) and MATCH(MATCH).

We extract the 2nd, 3rd, etc. values ​​using VLOOKUP

You already know that VLOOKUP can return only one matching value, more precisely, the first one found. But what if this value is repeated several times in the viewed array, and you want to extract the 2nd or 3rd of them? What if all values? The problem seems intricate, but the solution exists!

Suppose one column of the table contains the names of the customers (Customer Name), and the other column contains the products (Product) that they bought. Let's try to find the 2nd, 3rd and 4th items purchased by a given customer.

The easiest way is to add an auxiliary column before the column customer name and fill it with customer names with the repetition number of each name, for example, John Doe1, John Doe2 etc. We will do the trick with numbering using the function COUNTIF(COUNTIF), given that the customer names are in column B:

B2&COUNTIF($B$2:B2,B2)
=B2&COUNTIF($B$2:B2,B2)

After that you can use the normal function VLOOKUP to find the required order. For example:

  • We find 2nd Dan Brown:

    VLOOKUP("Dan Brown2",$A$2:$C$16,3,FALSE)
    =VLOOKUP("Dan Brown2",$A$2:$C$16,3,FALSE)

  • We find 3rd item ordered by the customer Dan Brown:

    VLOOKUP("Dan Brown3",$A$2:$C$16,3,FALSE)
    =VLOOKUP("Dan Brown3",$A$2:$C$16,3,FALSE)

If you are only looking for 2nd repetition, you can do it without the auxiliary column by creating a more complex formula:

IFERROR(VLOOKUP($F$2,INDIRECT("$B$"&(MATCH($F$2,Table4,0)+2)&":$C16"),2,FALSE),"")
=IFERROR(VLOOKUP($F$2;INDIRECT("$B$"&(MATCH($F$2;Table4;0)+2)&":$C16");2;TRUE);"")

In this formula:

  • $F$2- a cell containing the name of the buyer (it is unchanged, please note - the link is absolute);
  • $B$- column customer name;
  • Table4- Your table (this place can also be a regular range);
  • $C16- the end cell of your table or range.

This formula finds only the second matching value. If you need to extract the remaining repetitions, use the previous solution.

If you need a list of all matches - the function VLOOKUP this is not a helper, since it only returns one value at a time - period. But Excel has a function INDEX(INDEX), which can easily cope with this task. How such a formula will look like, you will learn in the following example.

Retrieve all repetitions of the desired value

As mentioned above, VLOOKUP cannot extract all duplicate values ​​from the scanned range. To do this, you need a slightly more complex formula, made up of several Excel functions, such as INDEX(INDEX), SMALL(SMALL) and ROW(LINE)

For example, the formula below finds all repetitions of the value from cell F2 in the range B2:B16 and returns the result from the same rows in column C.

(=IFERROR(INDEX($C$2:$C$16,SMALL(IF($F$2=B2:B16,ROW(C2:C16)-1,""),ROW()-3)),"") )
(=IFERROR(INDEX($C$2:$C$16,SMALL(IF($F$2=B2:B16,ROW(C2:C16)-1,"");ROW()-3)),"") )

Enter this array formula into multiple adjacent cells, such as the cells F4:F8 as shown in the figure below. The number of cells must be equal to or greater than the maximum possible number of repetitions of the searched value. Don't forget to click Ctrl+Shift+Enter to enter the array formula correctly.

If you're interested in understanding how it works, let's dive into the details of the formula a bit:

Part 1:

IF($F$2=B2:B16,ROW(C2:C16)-1,"")
IF($F$2=B2:B16;ROW(C2:C16)-1;"")

$F$2=B2:B16– compare the value in cell F2 with each of the values ​​in the range B2:B16. If a match is found, then the expression STRING(C2:C16)-1 returns the number of the corresponding line (value -1 allows you to not include the header line). If there are no matches, the function IF(IF) returns an empty string.

Function result IF(IF) there will be such a horizontal array: (1,"",3,"",5,"","","","","","",12,"","","" )

Part 2:

ROW()-3
STRING()-3

Here the function ROW(LINE) acts as an additional counter. Since the formula is copied into cells F4:F9, we subtract the number 3 from function result to get value 1 in a cell F4(line 4, subtract 3) to get 2 in a cell F5(line 5, subtract 3) and so on.

Part 3:

SMALL(IF($F$2=B2:B16,ROW(C2:C16)-1,""),ROW()-3))
SMALL(IF($F$2=B2:B16,ROW(C2:C16)-1,"");ROW()-3))

Function SMALL(SMALL) returns nth the smallest value in the data array. In our case, which position (from the smallest) to return is determined by the function ROW(LINE) (see Part 2). So, for a cell F4 function SMALL((array),1) returns 1st(smallest) array element, i.e. 1 . For cell F5 returns 2nd the smallest element in the array, that is 3 , and so on.

Part 4:

INDEX($C$2:$C$16,SMALL(IF($F$2=B2:B16,ROW(C2:C16)-1,""),ROW()-3))
INDEX($C$2:$C$16;SMALL(IF($F$2=B2:B16;ROW(C2:C16)-1;"");ROW()-3))

Function INDEX(INDEX) simply returns the value of a specific cell in an array C2:C16. For cell F4 function INDEX($C$2:$C$16,1) will return apples, For F5 function INDEX($C$2:$C$16;3) will return Sweets and so on.

Part 5:

IFERROR()
IFERROR()

Finally, we put the formula inside the function IFERROR(IFERROR), because you are unlikely to be pleased with the error message #N/A(#N/A) if the number of cells into which the formula is copied is less than the number of duplicate values ​​in the range being viewed.

2D search by known row and column

Performing a 2D search in Excel involves searching for a value by a known row and column number. In other words, you are extracting the cell value at the intersection of a particular row and column.

So, let's turn to our table and write a formula with a function VLOOKUP, which will find information about the cost of lemons sold in March.

There are several ways to perform a 2D search. Check out the options and choose the one that suits you best.

VLOOKUP and MATCH functions

You can use a bunch of functions VLOOKUP(VLOOKUP) and MATCH(MATCH) to find the value at the intersection of the fields The product's name(string) and Month(column) of the array in question:

VLOOKUP("Lemons",$A$2:$I$9,MATCH("Mar",$A$1:$I$1,0),FALSE)
=VLOOKUP("Lemons",$A$2:$I$9,MATCH("Mar",$A$1:$I$1,0),FALSE)

The formula above is a regular function VLOOKUP, which looks for an exact match of the value "Lemons" in cells A2 through A9. But since you don't know which column the March sales are in, you won't be able to set the column number for the third function argument. VLOOKUP. Instead, the function is used MATCH to define this column.

MATCH("Mar",$A$1:$I$1,0)
MATCH("Mar";$A$1:$I$1;0)

Translated into human language, this formula means:

  • Looking for characters "Mar" - argument lookup_value(lookup_value);
  • Looking in cells from A1 to I1 - argument lookup_array(lookup_array);
  • Returning exact match - argument match_type(match_type).

Using 0 in the third argument, you say functions MATCH look for the first value that exactly matches the value you are looking for. This is equivalent to the value FALSE(FALSE) for the fourth argument VLOOKUP.

This is how you can create a two-way search formula in Excel, also known as two-dimensional search or bidirectional search.

SUMPRODUCT function

Function SUMPRODUCT(SUMPRODUCT) returns the sum of the products of the selected arrays:

SUMPRODUCT(($A$2:$A$9="Lemons")*($A$1:$I$1="Mar"),$A$2:$I$9)
=SUMPRODUCT(($A$2:$A$9="Lemons")*($A$1:$I$1="Mar");$A$2:$I$9)

INDEX and MATCH functions

In the next article I will explain these functions in detail, so for now you can just copy this formula:

INDEX($A$2:$I$9,MATCH("Lemons",$A$2:$A$9.0),MATCH("Mar",$A$1:$I$1.0))
=INDEX($A$2:$I$9;MATCH("Lemons";$A$2:$A$9;0);MATCH("Mar";$A$1:$I$1;0))

Named ranges and the intersection operator

If you're not into all those complex Excel formulas, you might like this visual and memorable way:

When you enter a name, Microsoft Excel will show a tooltip with a list of matching names, just like when you enter a formula.

  1. Click Enter and check the result

In general, whichever of the above methods you choose, the result of a two-dimensional search will be the same:

Using multiple VLOOKUPs in one formula

It happens that the main table and the lookup table do not have a single column in common, and this prevents you from using the usual function VLOOKUP. However, there is another table that does not contain the information we are interested in, but has a common column with the main table and the lookup table.

Let's take a look at the following example. We have a Main table with a column SKU (new), where you want to add a column with the corresponding prices from another table. In addition, we have 2 lookup tables. The first one (Lookup table 1) contains updated numbers SKU (new) and product names, and the second (Lookup table 2) - product names and old numbers SKU (old).

To add prices from the second lookup table to the main table, you must perform an action known as double VLOOKUP or nested VLOOKUP.

  1. Write a function VLOOKUP, which finds the product name in the table lookup table 1 using SKU, as the desired value:

    VLOOKUP(A2,New_SKU,2,FALSE)
    =VLOOKUP(A2;New_SKU;2;FALSE)

    Here New_SKU- named range $A:$B in the table lookup table 1, A 2 - this is column B, which contains the names of the goods (see the picture above)

  2. Write a formula to insert prices from a table lookup table 2 based famous names goods. To do this, paste the formula you created earlier as the lookup value for the new function VLOOKUP:

    VLOOKUP(VLOOKUP(A2,New_SKU,2,FALSE),Price,3,FALSE)
    =VLOOKUP(VLOOKUP(A2,New_SKU,2,FALSE),Price,3,FALSE)

    Here price- named range $A:$C in the table lookup table 2, A 3 is column C containing prices.

The figure below shows the result returned by the formula we created:

Dynamic substitution of data from different tables using VLOOKUP and INDIRECT

First, let's clarify what we mean by "Dynamic substitution of data from different tables" to make sure we understand each other correctly.

There are situations when there are several sheets with data of the same format, and it is necessary to extract the necessary information from a certain sheet, depending on the value that is entered in a given cell. I think it's easier to explain this with an example.

Imagine that you have sales reports for several regions with the same products and in the same format. You want to find sales figures for a specific region:

If you have only two such reports, then you can use a disgracefully simple formula with functions VLOOKUP And IF(IF) to select the desired report to search:

VLOOKUP($D$2,IF($D3="FL",FL_Sales,CA_Sales),2,FALSE)
=VLOOKUP($D$2,IF($D3="FL",FL_Sales,CA_Sales),2,FALSE)

  • $D$2 is a cell containing the name of the product. Note that we use absolute references here to avoid changing the lookup value when copying the formula to other cells.
  • $D3 is a cell with the name of the region. We are using an absolute column reference and a relative row reference because we plan to copy the formula to other cells in the same column.
  • FL_Sales And CA_Sales– the names of the tables (or named ranges) that contain the corresponding sales reports. You can, of course, use the usual sheet names and cell range references, for example 'FL Sheet'!$A$3:$B$10, but named ranges are much more convenient.

However, when there are many such tables, the function IF is not the best solution. Instead, you can use the function INDIRECT(INDIRECT) to return the desired search range.

As you probably know, the function INDIRECT is used to return a link given by a text string, which is exactly what we need now. So, boldly replace in the above formula the expression with the function IF to link with function INDIRECT. Here is a combination VLOOKUP And INDIRECT works great with:

VLOOKUP($D$2,INDIRECT($D3&"_Sales"),2,FALSE)
=VLOOKUP($D$2;INDIRECT($D3&"_Sales");2;FALSE)

  • $D$2- this is a cell with the name of the product, it is unchanged due to the absolute link.
  • $D3 is the cell containing the first part of the region name. In our example, this FL.
  • _Sales- the common part of the name of all named ranges or tables. Combined with the value in cell D3, it forms full name required range. Below are some details for those who are new to the function INDIRECT.

How INDIRECT and VLOOKUP work

First, let me remind you the syntax of the function INDIRECT(INDIRECT):

  • A1 if the argument is TRUE(TRUE) or not specified;
  • R1C1, If FALSE(LIE).

So let's get back to our sales reports. If you remember, then each report is a separate table located on separate sheet. For the formula to work correctly, you must name your tables (or ranges), and all names must have a common part. For example, like this: CA_Sales, FL_Sales, TX_Sales and so on. As you can see, all the names contain “_Sales”.

Function INDIRECT connects the value in column D and the text string "_Sales", thereby telling VLOOKUP in which table to search. If cell D3 contains the value “FL”, the formula will search the table FL_Sales, if “CA” is in the table CA_Sales and so on.

The result of the functions VLOOKUP And INDIRECT will be the following:

If the data is located in different Excel books, then you need to add the name of the book before the named range, for example:

VLOOKUP($D$2,INDIRECT($D3&"Workbook1!_Sales"),2,FALSE)
=VLOOKUP($D$2;INDIRECT($D3&"Workbook1!_Sales");2;FALSE)

If the function INDIRECT refers to another workbook, that workbook must be open. If it is closed, the function will report an error. #ref!(#REF!).

In this article, you will learn about 5 useful properties of pivot tables that will help you quickly and in detail analyze the situation (using the example of customer base analysis). You will learn:

1. How to group data;
2. What indicators can be calculated when summarizing data;
3. How to simultaneously calculate several indicators for one parameter when summarizing data;
4. What additional calculation options can you use when summarizing data?
5. About the possibility of sorting.

And based on this analysis, we will touch on the most powerful technique for planning sales promotions in the FMCG markets.

Let's start with a pivot table. Let's take a simple table of sales to customers by day.

Place the cursor in the upper left corner of our table, then go to the "Insert" menu and click on the "Pivot Table" button:

In the Create PivotTable dialog box, click OK:

We got a pivot table on a new sheet:

1st useful feature of a pivot table for business analysis - data grouping

So, we have shipments to customers by day, we want to understand in what range of shipments we have the maximum sales. To do this, we need to group shipments into ranges.

Drag the "Shipping amount" field to the "Line names" area of ​​the pivot table (hold down the "Shipping_amount" field with the left mouse button and drag it to the "Line names" section of the pivot table):

We have displayed all shipments in the left column of the summary. Now we set the cursor to our shipments (as in the figure):

Go to the Excel menu "Data" and click on the "Group" button

In the dialog box that appears, set the grouping step to "5000" (you can enter any) and click "OK"

We get grouped sales volumes with a given step:

In order to the group looked nice and perceived, press again "Group" button and manually set equal values, for the value "starting from" - "-15,000" (below the minimum value, a multiple of 5000) "to" - "45,000" (greater than the maximum group, a multiple of 5000).

We get grouped data by shipment amount:

2nd useful feature of pivot tables for business analysis -
the ability to calculate various summary parameters by fields from the source table

So, shipments have been grouped, now let's see what sales volumes fall on each range of shipments. To do this, let's sum the shipments in the summary.

Left-click the "Shipping_amount" field and drag it to the summary "Values" field:

The summary by default calculated "Quantity by field Shipment_amount", i.e. the number of records in our original table on the "Data" sheet. Because Since our table contains information on sales to customers by day, our indicator "Quantity in the field Shipment_amount" is the number of shipments to customers.

As a result, in the pivot table we see the number of shipments to customers in different shipment ranges:

How can we get the amount of shipments from the number of shipments?

We left-click on the field "Quantity by field Shipment amount" in the area of ​​​​the pivot table "Values", and in the menu that opens, select "Parameters of value fields ..."

In the window that opens, select the data reduction operation we are interested in (Sum, quantity, average, maximum, minimum ...). Select the operation we need "sum" and click "OK".

We get the total sales volume for each shipment range:

Those. we see how much sales fall on shipments in the range from 0 to 5,000 rubles, from 5,000 to 10,000 rubles. etc. And it is clear that the maximum volume of shipments falls on the range from zero to 5000 rubles.

3 property - the ability for one field to calculate various data reduction operations

Now we would like to see how many shipments and what average shipments we have in each of the ranges. To do this, we use the pivot table to calculate the number of shipments and average shipments.

In the area of ​​\u200b\u200bthe pivot table "Values" we drag the field "Shipping_amount" 2 more times and in the parameters of the value field for the second select "quantity" and for the third field select "average".

We get for each range of shipments the sales volume, the number of shipments and the average shipment:

Now we can see in which range of shipments the maximum sales volume and the maximum number of shipments. In our example, this is for the range from 0 to 5000 rubles. and the volume of sales and the number of shipments as much as possible.

4th property of pivot tables - the ability to carry out additional calculations

For clarity of data analysis, let's add 2 more parameters - "Share by sales volume for each group" and "Share of the number of shipments for each group".

To do this, in the field of the pivot table "Values" drag the field "Shipping amount" 2 more times

Moreover, for one parameter in the menu "Parameters of the field of values" () we will select the operation "sum", and for the second operation "quantity".

We get the following table:

Now once again we go to the "Parameters of the value fields" and enter the tab "Additional calculations":

Select in the field "Additional calculations" the item "Share of the total amount"

We get a table in which for each range of shipments to customers we see the volume of sales, the number of shipments, the average shipment, the share of sales for each group and the share of the number of shipments for each group:

5 useful property - sorting

Now, for clarity, from the maximum to the minimum group by sales volume, we will sort. To do this, place the cursor in the field with the volume of sales by groups and click on the "sort from maximum to minimum" button:

It can be seen that the maximum group in terms of sales volume and the number of shipments is the group "from 0 to 5000 rubles." average sales in this group are 1971 rubles.

Note! The average shipment across all customers is significantly different from 86% of shipments. Moreover, it differs significantly

  • for all groups, the average shipment is 2,803 rubles. (in line total).
  • And for 86% of shipments, 1,971 rubles.

This is a serious difference, and if we stimulate sales based on 86% of shipments and the average for them - 1,971 rubles, then our actions will be more accurate, and the effect is much higher, because. We will be able to interest the maximum number of customers.

This example shows a powerful technique for mass market promotion planning and sales forecasting that can help you make a big impact and make a difference.

If you have any questions, please contact.

Accurate predictions for you!

Join us!

Download Free Forecasting and Business Intelligence Apps:


  • Novo Forecast Lite- automatic forecast calculation V excel.
  • 4analytics- ABC-XYZ analysis and analysis of emissions in Excel.
  • Qlik Sense Desktop and QlikViewPersonal Edition - BI systems for data analysis and visualization.

Test the features of paid solutions:

  • Novo Forecast PRO- forecasting in Excel for large data arrays.