Creating Summary Searches with Grouping: A Guide to Data Aggregation
Creating Summary Searches with Grouping: A Guide to Data Aggregation
Creating Summary Searches with Grouping: A Guide to Data Aggregation
This guide provides a fact-checked and expanded overview of building summary searches in NetSuite.
This guide provides a fact-checked and expanded overview of building summary searches in NetSuite.
This guide provides a fact-checked and expanded overview of building summary searches in NetSuite.
9 min read
Standard "detail" searches are perfect for listing individual records, but their power is limited when you need to see the bigger picture. Summary searches are the answer. They allow you to aggregate thousands of records into concise, meaningful groups—transforming raw data into high-level insights like total sales per customer, order counts by status, or average transaction value by sales rep. This guide provides a fact-checked and expanded overview of building summary searches in NetSuite.
The Golden Rule of Summary Searches
When you create a summary search, you must adhere to one fundamental rule: every column in your results must have a Summary Type assigned. You cannot mix detail-level columns with aggregated columns. Each field must either be used for grouping or for calculation.
Understanding Summary Types
On the Results subtab of your saved search, you will assign one of the following summary types to each column:
Summary Type | Description | Example Use Case |
|---|---|---|
Group | The cornerstone of your summary. All records with the same value in this field will be combined into a single summary row. This is equivalent to a | Group by |
Sum | Adds up all the numeric values within each group. | Sum the |
Count | Counts the number of records within each group. | Count the |
Average | Calculates the average (mean) of the numeric values within each group. | Average the |
Minimum | Finds the lowest value within each group. | Find the |
Maximum | Finds the highest value within each group. | Find the |
Building a Summary Search: A Step-by-Step Example
Goal: Create a search showing total sales by customer.
Create a new Transaction saved search.
On the Criteria subtab, filter for
TypeisInvoiceandMain LineisYes.Navigate to the Results subtab.
Add the `Customer` field. Set its Summary Type to Group.
Add the `Amount` field. Set its Summary Type to Sum.
Give the columns clear Custom Labels (e.g., "Customer" and "Total Sales").
Save and run the search. The result will be a list with one row for each customer, showing their total invoice amount.
Criteria vs. Summary Criteria: A Critical Distinction
NetSuite provides two ways to filter summary searches, and understanding the difference is essential.
Standard Criteria (The "Where" Clause)
These filters are applied to the raw data before any grouping or aggregation occurs. Use this for filtering the dataset that goes into your summary.
Example: Setting
TypeisInvoiceandDateisthis year.Effect: NetSuite first finds all invoices from this year, and then it groups them according to your summary settings.
Summary Criteria (The "Having" Clause)
These filters are applied after the data has been grouped and aggregated. Use this to filter based on the summarized results.
Example: Setting
Sum of Amountisgreater than 50,000.Effect: NetSuite first calculates the total sales for every customer, and then it filters the results to show only those customers whose total is over $50,000.
Advanced Techniques
Multi-Level Grouping: You can group by multiple fields to create a more granular summary. For example, grouping by
Sales Repand then byCustomerwill show you each customer's total, nested under their assigned sales rep.Date Grouping: When grouping by a date field, you can choose the level of aggregation:
Year,Quarter,Month, orWeek.Formulas in Summaries: You can group by a
Formula (Text)field to create custom categories. For instance, use aCASEstatement to create aging buckets and thenCountthe transactions in each bucket.
Best Practices
Start with Criteria: Always apply as many standard criteria as possible to reduce the initial dataset. This makes your summary search run much faster.
No Drill Down: Remember that summary search results cannot be drilled down into to see the underlying detail records. If users need to see the detail, consider providing a separate, linked detail search.
Dashboard KPIs: Summary searches are the engine behind Key Performance Indicator (KPI) portlets on dashboards. Use them to display high-level metrics like total sales, new leads, or open cases.
Standard "detail" searches are perfect for listing individual records, but their power is limited when you need to see the bigger picture. Summary searches are the answer. They allow you to aggregate thousands of records into concise, meaningful groups—transforming raw data into high-level insights like total sales per customer, order counts by status, or average transaction value by sales rep. This guide provides a fact-checked and expanded overview of building summary searches in NetSuite.
The Golden Rule of Summary Searches
When you create a summary search, you must adhere to one fundamental rule: every column in your results must have a Summary Type assigned. You cannot mix detail-level columns with aggregated columns. Each field must either be used for grouping or for calculation.
Understanding Summary Types
On the Results subtab of your saved search, you will assign one of the following summary types to each column:
Summary Type | Description | Example Use Case |
|---|---|---|
Group | The cornerstone of your summary. All records with the same value in this field will be combined into a single summary row. This is equivalent to a | Group by |
Sum | Adds up all the numeric values within each group. | Sum the |
Count | Counts the number of records within each group. | Count the |
Average | Calculates the average (mean) of the numeric values within each group. | Average the |
Minimum | Finds the lowest value within each group. | Find the |
Maximum | Finds the highest value within each group. | Find the |
Building a Summary Search: A Step-by-Step Example
Goal: Create a search showing total sales by customer.
Create a new Transaction saved search.
On the Criteria subtab, filter for
TypeisInvoiceandMain LineisYes.Navigate to the Results subtab.
Add the `Customer` field. Set its Summary Type to Group.
Add the `Amount` field. Set its Summary Type to Sum.
Give the columns clear Custom Labels (e.g., "Customer" and "Total Sales").
Save and run the search. The result will be a list with one row for each customer, showing their total invoice amount.
Criteria vs. Summary Criteria: A Critical Distinction
NetSuite provides two ways to filter summary searches, and understanding the difference is essential.
Standard Criteria (The "Where" Clause)
These filters are applied to the raw data before any grouping or aggregation occurs. Use this for filtering the dataset that goes into your summary.
Example: Setting
TypeisInvoiceandDateisthis year.Effect: NetSuite first finds all invoices from this year, and then it groups them according to your summary settings.
Summary Criteria (The "Having" Clause)
These filters are applied after the data has been grouped and aggregated. Use this to filter based on the summarized results.
Example: Setting
Sum of Amountisgreater than 50,000.Effect: NetSuite first calculates the total sales for every customer, and then it filters the results to show only those customers whose total is over $50,000.
Advanced Techniques
Multi-Level Grouping: You can group by multiple fields to create a more granular summary. For example, grouping by
Sales Repand then byCustomerwill show you each customer's total, nested under their assigned sales rep.Date Grouping: When grouping by a date field, you can choose the level of aggregation:
Year,Quarter,Month, orWeek.Formulas in Summaries: You can group by a
Formula (Text)field to create custom categories. For instance, use aCASEstatement to create aging buckets and thenCountthe transactions in each bucket.
Best Practices
Start with Criteria: Always apply as many standard criteria as possible to reduce the initial dataset. This makes your summary search run much faster.
No Drill Down: Remember that summary search results cannot be drilled down into to see the underlying detail records. If users need to see the detail, consider providing a separate, linked detail search.
Dashboard KPIs: Summary searches are the engine behind Key Performance Indicator (KPI) portlets on dashboards. Use them to display high-level metrics like total sales, new leads, or open cases.
Ready to Work Together?
Ready to Work Together?
Ready to Work Together?
Let us talk about your NetSuite challenges and how we can help. No pressure, no sales pitch. Just a straightforward conversation.
Let us talk about your NetSuite challenges and how we can help. No pressure, no sales pitch. Just a straightforward conversation.
Author


Michael Strong
Michael Strong
Founder & Principal Architect
Founder & Principal Architect
Tags
Read More
Read More


