Name Address City State ZIP Sales Rep ID Hire Date Base Salary Annual Salary Increase Commission Rate
Name Address City State ZIP Sales Rep ID Hire Date Base Salary Annual Salary Increase Commission Rate
Sales Data and Statistics by Year: Database Functions to Summarize Sales and Orders:
Total Average Total # of Total Minimum Maximum
Year: Sales: Order Size: Orders: Commissions: Order: Order: Industry State Region Amount Order Date
2016 $ 969,030 $ 138,433 7 $ 145,355 $ 100,003 $ 183,593 Industrials Midwest >=1/1/2021
2017 2,965,850 164,769 18 444,878 130,140 212,181 Industrials Northeast >=1/1/2021
2018 6,211,826 200,381 31 854,654 152,840 247,084 Energy Midwest >=1/1/2021
2019 12,074,872 232,209 52 1,626,392 179,026 294,208 Energy Northeast >=1/1/2021
2020 22,000,859 275,011 80 2,878,891 200,199 349,898
2021 33,973,085 311,680 109 4,351,913 232,239 399,753 Order Total:
2022 42,930,202 343,442 125 5,056,366 250,174 448,996 Order Count:
2023 61,048,714 388,845 157 6,906,900 300,835 499,546 Commission Total:
2024 90,993,446 497,232 183 9,854,571 400,117 596,090
2025 135,147,098 570,241 237 14,472,759 450,506 698,189
2026
Year: 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025
Revenue: $ 969,030 $ 2,965,850 $ 6,211,826 $ 12,074,872 $ 22,000,859 $ 33,973,085 $ 42,930,202 $ 61,048,714 $ 90,993,446 $ 135,147,098
Revenue Growth: 115.6 % 206.1 % 109.4 % 94.4 % 82.2 % 54.4 % 26.4 % 42.2 % 49.1 % 48.5 %
Net After Commissions: 823,676 2,520,973 5,357,172 10,448,480 19,121,968 29,621,173 37,873,836 54,141,814 81,138,875 120,674,339
Average Order Size: $ 138,433 $ 164,769 $ 200,381 $ 232,209 $ 275,011 $ 311,680 $ 343,442 $ 388,845 $ 497,232 $ 570,241
Total # of Orders: 7 18 31 52 80 109 125 157 183 237
Select Year: 2025 Sales by Sales Rep - 2025
Improved Queries with Database Functions (Combined PC/Mac Lesson) Part 1: Simple Database Functions and Queries
Database Functions in Excel fix some, but not all, of the problems with SUMIFS and SUMPRODUCT: Formulas The most common Database Functions are as follows:
that are long and difficult to read, trouble with dates in some cases, and difficulty in entering complex tests,
Order Date Sales Rep ID such as dates in between a range AND a certain Sales Rep ID but NOT a certain Industry. =DSUM Add numbers in a field (i.e., table column) that match spe
<=12/31/2024 =DCOUNT Count # cells in a field (i.e., a table column) that match sp
<=12/31/2024 But, they do require more time and effort to set up because you need to create a separate area of the sheet =DCOUNTA Same, but only for nonblank cells
<=12/31/2024 to support them, you must get the syntax exactly right and order the fields in the same order as in the table, =DGET Extracts single row from table that matches specific cond
<=12/31/2024 and there is a bit of a learning curve - small syntax errors will break everything.
And there are many others: DAVERAGE, DPRODUCT, DMAX, DMIN, DSTDEV, DVAR, etc., bu
$ 13,682,984 Also, the data must be in tabular format, ideally in a Data Table, so these functions are less flexible than ones not that useful for simple customer order analysis.
34 like INDEX/MATCH for retrieval. And you still can't "join together" Tables based on Relationships.
1,467,172 Here's how DSUM works:
In general, Database Functions are most useful for setting up queries with complex criteria, such as multiple
AND's and OR's, involving dates, amounts, regions, industries, etc. They're overkill for simple criteria. =DSUM(Database, Field, Criteria)
Database: Range of cell references - field names MUST be in here. This should ideally be a
Year Revenue Revenue Growth Avg. Order Size # Orders
2016 $ 969,030 115.6 % $ 138,433 7 Field: The column or field you're adding up or counting - can be the actual, exact name, or
2017 2,965,850 206.1 % 164,769 18 number. Ideally, you will create a direct link to this in the table to avoid errors.
2018 6,211,826 109.4 % 200,381 31
2019 12,074,872 94.4 % 232,209 52 Criteria: Should include at least one field name in the range of cell references AND at least
2020 22,000,859 82.2 % 275,011 80 to be evaluated. If you leave these blank, DSUM will just sum up everything without conditi
2021 33,973,085 54.4 % 311,680 109
2022 42,930,202 26.4 % 343,442 125 =DSUM(Order_Table[#All],Order_Table[[#Headers],[Amount]],Summary!$J$6:$P$7)
2023 61,048,714 42.2 % 388,845 157
2024 90,993,446 49.1 % 497,232 183 Yes, you need to enter the entire table including the headers - hence the [#All] part - and
2025 135,147,098 48.5 % 570,241 237 part is just one entry, but Excel uses a comma to separate the [Amount] from the [#Heade
Status: 1 1 You CAN enter the same Header or Field/Column Title twice, but it's generally only useful fo
Year Revenue Revenue Growth Year Average Order Size
Total # of Orders number fields like Amount - everything is joined with an AND, so you can create ranges like
If you get any of this even slightly wrong, it won't work. Sorry! And Excel will not tell you wh
header names, range of cells, etc.
Now we can try entering values for Region, Industry, Order Dates, Sales Rep ID, etc.
Average Order Size and # of Orders by Year, 1900 to 1900
All the normal operators - <, >, <=, >=, <>, =, *, and ? - still work here. But be careful! (Spide
Grand Total
Selected Data:
Year Min Order Size Range Average Order Size Max Order
base Functions are as follows: Just like you can include multiple columns in the Criteria - example with Order Dates for selecting
a range of dates, you can also include multiple rows if you change the criteria range to include them.
Add numbers in a field (i.e., table column) that match specific conditions
Count # cells in a field (i.e., a table column) that match specific conditions In a single row, the conditions are all joined by AND - DSUM and DCOUNT will only sum up or count
Same, but only for nonblank cells entries if ALL the conditions are TRUE.
Extracts single row from table that matches specific conditions
But with multiple rows, each row is joined with an OR instead. So, everything in Row 1 must be
ers: DAVERAGE, DPRODUCT, DMAX, DMIN, DSTDEV, DVAR, etc., but most of those are true… OR everything in Row 2 must be true.
e customer order analysis.
So, we could add or count entries based on criteria like:
references - field names MUST be in here. This should ideally be a Data Table. Honestly, though, this feature is not that useful in most cases because you rarely, if ever, need
to find something this specific.
d you're adding up or counting - can be the actual, exact name, or the column
create a direct link to this in the table to avoid errors. And even if you do, you're probably looking at it in the context of larger trends/patterns, and
Database Functions are not so useful for those.
at least one field name in the range of cell references AND at least one other condition
ave these blank, DSUM will just sum up everything without conditions. Exercise: Your Own AND/OR Summation
l],Order_Table[[#Headers],[Amount]],Summary!$J$6:$P$7) Sum up all Orders and Commissions from the Midwest or Northeast from companies in the Industrials
or Energy sectors, placed between 2021 and 2024.
he entire table including the headers - hence the [#All] part - and then the second
ut Excel uses a comma to separate the [Amount] from the [#Headers]
Header or Field/Column Title twice, but it's generally only useful for Dates and
nt - everything is joined with an AND, so you can create ranges like this.
n slightly wrong, it won't work. Sorry! And Excel will not tell you why. Same for the
values for Region, Industry, Order Dates, Sales Rep ID, etc.
- <, >, <=, >=, <>, =, *, and ? - still work here. But be careful! (Spiderman principle)