Two fields in a report

A report by city shows how much each city earned. But you often want to know more: what exactly people bought there, electronics or clothing. Here's such a report: Austin has a single number in it, and you can't see what it's made of:

fx
A
B
C
D
E
F
G
H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
City
Category
Revenue, $
Boston
Electronics
12400
Denver
Clothing
3200
Austin
Electronics
8700
Boston
Clothing
5100
Denver
Electronics
4800
Boston
Clothing
2900
Austin
Electronics
15300
Denver
Clothing
6100
Boston
Electronics
7400
Austin
Clothing
3900
Boston
Clothing
4400
Denver
Electronics
9800
Sheet1
Austin has a single number in the report, $27,900. Check “Category” in the field list and look at Austin.

The answer was in the same orders. The report was missing a second field: one splits the orders by city, the other splits each city by category.

Groups and subtotals

When Rows holds two fields, the first one sets the groups, and the second one is nested inside each group. In the report, it looks like this:

  • the city row is in bold, and next to its name there's a subtotal: the revenue of the whole city;
  • below it, indented, come the categories of that city;
  • at the bottom, Grand Total for all the cities.

Which field goes outside, which inside

The groups come from the field that's first in Rows, and Excel puts fields there in the order you checked them. A "City, then Category" report helps you compare categories within one city. A "Category, then City" report gathers the cities inside each category: that way you can see which city bought the most electronics. The numbers in both are the same.

fx
A
B
C
D
E
F
G
H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
City
Category
Revenue, $
Boston
Electronics
12400
Denver
Clothing
3200
Austin
Electronics
8700
Boston
Clothing
5100
Denver
Electronics
4800
Boston
Clothing
2900
Austin
Electronics
15300
Denver
Clothing
6100
Boston
Electronics
7400
Austin
Clothing
3900
Boston
Clothing
4400
Denver
Electronics
9800
Sheet1
Right now the groups are cities. Click the “Category” field in the Rows area and choose Move Up.

A second field in columns

You can put the categories next to the cities instead of under them. Then the report becomes an ordinary table: cities in rows, categories in columns, and where they cross, the city's revenue in that category.

fx
A
B
C
D
E
F
G
H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
City
Category
Revenue, $
Boston
Electronics
12400
Denver
Clothing
3200
Austin
Electronics
8700
Boston
Clothing
5100
Denver
Electronics
4800
Boston
Clothing
2900
Austin
Electronics
15300
Denver
Clothing
6100
Boston
Electronics
7400
Austin
Clothing
3900
Boston
Clothing
4400
Denver
Electronics
9800
Sheet1
To put the categories next to the cities, click the “Category” field in the Rows area and choose Move to Column Labels.

Columns are handy when there are two or three categories and you want to compare them in one row. If there are many categories, the table spreads too wide, so they stay in Rows.

One checkbox broke Austin down into parts: it bought $24,000 worth of electronics and only $3,900 worth of clothing.