Trouble Viewing Images? Right-click on any image and select "Open in new tab" to view a larger version. You can also zoom in using Ctrl + Mouse Wheel for easier readability.
Article Goal
Learn how Filter, Sort, Group, and Sum (FSGS) work together to control the data returned and displayed within a VDM View.
What is FSGS?
FSGS stands for:
| Component | Purpose |
|---|---|
| Filter | Determines which records are returned. |
| Sort | Controls the order of the returned records. |
| Group | Organizes records into categories in the Summary Grid. |
| Sum | Calculates totals and aggregates for grouped data. |
FSGS is one of the core building blocks of a VDM View and is used to control how data is filtered, organized, and summarized.
When Would I Use FSGS?
Use FSGS when you need to:
- Filter data to specific records.
- Sort results for easier analysis.
- Group related records together.
- Calculate totals, counts, averages, or other summary values.
FSGS is commonly used when building reports that require summarized or organized data instead of raw detail records.
How FSGS Works Together
FSGS defines the structure and logic of a report:
- Filter selects the records to return.
- Sort organizes those records.
- Group categorizes related records.
- Sum calculates totals and aggregates.
For example:
- Filter: Show orders from the current month.
- Sort: Order results by Order Date.
- Group: Group results by Salesperson.
- Sum: Calculate total sales for each Salesperson.
Filter
Filters determine which records are included in the View.
| Example |
|---|
| Show orders from the current month |
| Show invoices greater than $1,000 |
| Show active customers only |
Ex: Show data for the current month
Sort
Sorting controls the order in which records are displayed.
| Sort Type | Example |
|---|---|
| Ascending (ASC) | A → Z, 1 → 10, Oldest → Newest |
| Descending (DESC) | Z → A, 10 → 1, Newest → Oldest |
Group
Grouping combines records with the same value into categories, allowing calculations to be performed at the group level instead of on individual records.
| Example |
|---|
| Group orders by Salesperson |
| Group invoices by Customer |
| Group transactions by Department |
Grouped items appear in the Summary Grid, which displays summarized results separately from the Detail Grid.
Sum
Summary Fields perform calculations on grouped data.
Common functions include:
| Function | Description |
|---|---|
| Sum | Total value |
| Count | Number of records |
| Average | Average value |
| Minimum | Lowest value |
| Maximum | Highest value |
Summary Fields are used to calculate totals and other aggregate values for grouped data.
Example Workflow
The following example demonstrates all four FSGS components working together:
| Component | Example |
|---|---|
| Filter | Current Month Orders |
| Sort | Order Date ASC |
| Group | Employee |
| Sum | Total Freight |
Result:
- Only current month orders are returned.
- Orders are sorted by date.
- Results are grouped by employee.
- Freight totals are calculated for each employee.
Comments
0 comments
Please sign in to leave a comment.