Skip to main content

Reporting with Custom Segments

Leverage custom segments for multi-dimensional financial analysis and reporting.


Report Types Supporting Segments​

Report TypeSegment SupportNotes
Financial Reports✓Filter and group by segment
Saved Searches✓Filter, display, summarize
SuiteAnalytics Workbooks✓Full dimensional analysis
Report Builder✓Custom report layouts
Financial Statement✓P&L, Balance Sheet by segment

Financial Reports​

Income Statement by Segment​

Reports → Financial → Income Statement

Configure:

  1. Click Customize
  2. Add Custom Segment to filters
  3. Set Show to segment field
  4. Enable Expand for segment breakdown
INCOME STATEMENT BY PROJECT
Period: January 2025
─────────────────────────────────────────────────────────

PRJ-001 PRJ-002 PRJ-003 Total
─────────────────────────────────────────────────────────
REVENUE
Service Revenue $50,000 $75,000 $30,000 $155,000
Product Revenue $10,000 $15,000 $5,000 $30,000
─────────────────────────────────────────────────────────
Total Revenue $60,000 $90,000 $35,000 $185,000

EXPENSES
Professional Svcs $25,000 $45,000 $15,000 $85,000
Travel & Expenses $3,000 $8,000 $2,000 $13,000
Materials $5,000 $10,000 $3,000 $18,000
─────────────────────────────────────────────────────────
Total Expenses $33,000 $63,000 $20,000 $116,000

NET INCOME $27,000 $27,000 $15,000 $69,000
─────────────────────────────────────────────────────────

Balance Sheet by Segment​

Useful for tracking assets/liabilities by project:

BALANCE SHEET BY PROJECT
As of January 31, 2025
─────────────────────────────────────────────────────────

PRJ-001 PRJ-002 PRJ-003 Total
─────────────────────────────────────────────────────────
ASSETS
Accounts Receivable $15,000 $25,000 $10,000 $50,000
Work in Progress $8,000 $12,000 $5,000 $25,000
─────────────────────────────────────────────────────────

LIABILITIES
Accounts Payable $5,000 $10,000 $3,000 $18,000
Deferred Revenue $10,000 $15,000 $7,000 $32,000
─────────────────────────────────────────────────────────

Saved Searches​

Search with Segment Filter​

// SuiteScript saved search
search.create({
type: search.Type.TRANSACTION,
filters: [
['type', 'anyof', ['VendBill', 'ExpRpt']],
'AND',
['cseg_project', 'anyof', ['1', '2', '3']], // Segment values
'AND',
['trandate', 'within', 'thismonth']
],
columns: [
'tranid',
'trandate',
'entity',
'cseg_project', // Include segment in results
'amount'
]
});

Summary by Segment​

// Group by segment
search.create({
type: search.Type.TRANSACTION,
filters: [
['type', 'anyof', ['VendBill']],
'AND',
['mainline', 'is', 'T']
],
columns: [
search.createColumn({
name: 'cseg_project',
summary: search.Summary.GROUP
}),
search.createColumn({
name: 'amount',
summary: search.Summary.SUM
}),
search.createColumn({
name: 'internalid',
summary: search.Summary.COUNT
})
]
});

Results​

Project         Total Amount    Transaction Count
─────────────────────────────────────────────────
PRJ-001 $45,000 12
PRJ-002 $78,000 23
PRJ-003 $32,000 8
PRJ-004 $15,000 4

SuiteQL Queries​

Query Transactions by Segment​

SELECT
t.tranid,
t.trandate,
t.type,
t.entity,
cs.name AS project_name,
tl.amount
FROM
Transaction t
JOIN TransactionLine tl ON t.id = tl.transaction
LEFT JOIN CustomSegment_project cs ON tl.cseg_project = cs.id
WHERE
t.type = 'VendBill'
AND t.trandate >= '2025-01-01'
ORDER BY
t.trandate DESC

Aggregate by Segment​

SELECT
BUILTIN.DF(tl.cseg_project) AS project,
SUM(tl.amount) AS total_amount,
COUNT(DISTINCT t.id) AS transaction_count
FROM
Transaction t
JOIN TransactionLine tl ON t.id = tl.transaction
WHERE
t.type = 'VendBill'
AND tl.mainline = 'F'
GROUP BY
tl.cseg_project
ORDER BY
total_amount DESC

Cross-Tab Report​

SELECT
a.acctnumber,
a.fullname AS account_name,
SUM(CASE WHEN tl.cseg_project = 1 THEN tl.amount ELSE 0 END) AS prj_001,
SUM(CASE WHEN tl.cseg_project = 2 THEN tl.amount ELSE 0 END) AS prj_002,
SUM(CASE WHEN tl.cseg_project = 3 THEN tl.amount ELSE 0 END) AS prj_003,
SUM(tl.amount) AS total
FROM
TransactionLine tl
JOIN Transaction t ON tl.transaction = t.id
JOIN Account a ON tl.account = a.id
WHERE
t.trandate >= '2025-01-01'
AND tl.mainline = 'F'
GROUP BY
a.acctnumber, a.fullname
ORDER BY
a.acctnumber

SuiteAnalytics Workbooks​

Creating a Segment Dataset​

  1. Datasets → New Dataset
  2. Select Transaction record type
  3. Add fields:
    • Transaction Date
    • Transaction Type
    • Account
    • Amount
    • Custom Segment (cseg_project)

Pivot Table Configuration​

WORKBOOK: PROJECT ANALYSIS
─────────────────────────────────────────────────────────

Rows:
└── Account (expanded to detail)

Columns:
└── Project Code

Values:
└── Sum of Amount

Filters:
├── Transaction Date: This Quarter
└── Transaction Type: Vendor Bill, Expense Report

Visualization Options​

Chart TypeBest For
Bar ChartComparing totals across segments
Stacked BarShowing composition by account
Line ChartTrending over time by segment
Pie ChartSegment share of total
Pivot TableDetailed cross-tab analysis

Report Builder​

Custom Report with Segments​

Reports → New Report

  1. Select record type (Transaction)
  2. Add criteria:
    • Custom Segment equals [value]
  3. Add result columns:
    • Group by: Custom Segment
    • Sum: Amount
  4. Add subtotals per segment

Report Layout​

┌─────────────────────────────────────────────────────────┐
│ PROJECT EXPENSE REPORT │
│ Period: Q1 2025 │
├─────────────────────────────────────────────────────────┤
│ │
│ ▼ PRJ-001: Website Redesign │
│ ├── Jan 2025 │
│ │ └── VB-001 ABC Consulting $5,000 │
│ │ └── VB-002 XYZ Design $3,000 │
│ ├── Feb 2025 │
│ │ └── VB-005 ABC Consulting $7,000 │
│ └── Subtotal: $15,000 │
│ │
│ ▼ PRJ-002: Mobile App │
│ ├── Jan 2025 │
│ │ └── VB-003 Dev Team Inc $12,000 │
│ ├── Feb 2025 │
│ │ └── VB-006 Dev Team Inc $15,000 │
│ └── Subtotal: $27,000 │
│ │
│ ═══════════════════════════════════════════════════ │
│ GRAND TOTAL: $42,000 │
└─────────────────────────────────────────────────────────┘

Budget vs Actual Reporting​

Budget with Segments​

Budget Record Configuration:
├── Account: 6100 - Professional Services
├── Period: January 2025
├── Subsidiary: US Operations
├── Department: IT
├── Project Code: PRJ-002 ← Custom Segment
└── Amount: $50,000

Budget vs Actual Report​

Reports → Financial → Budget vs Actual

BUDGET VS ACTUAL BY PROJECT
Q1 2025
─────────────────────────────────────────────────────────

Account Budget Actual Variance %
─────────────────────────────────────────────────────────

PRJ-001: Website Redesign
Professional Svcs $30,000 $28,000 $2,000 93%
Travel $5,000 $4,500 $500 90%
Subtotal $35,000 $32,500 $2,500 93%

PRJ-002: Mobile App
Professional Svcs $50,000 $55,000 -$5,000 110%
Travel $8,000 $7,000 $1,000 88%
Subtotal $58,000 $62,000 -$4,000 107%

─────────────────────────────────────────────────────────
TOTAL $93,000 $94,500 -$1,500 102%

Dashboard KPIs​

Segment KPI Tiles​

// Portlet showing segment metrics
const getProjectKPIs = () => {
return search.create({
type: search.Type.TRANSACTION,
filters: [
['type', 'anyof', ['VendBill', 'Check', 'ExpRpt']],
'AND',
['trandate', 'within', 'thismonth'],
'AND',
['mainline', 'is', 'T']
],
columns: [
search.createColumn({
name: 'cseg_project',
summary: search.Summary.GROUP
}),
search.createColumn({
name: 'amount',
summary: search.Summary.SUM
})
]
}).run();
};

Dashboard Display​

┌─────────────────────────────────────────────────────────┐
│ PROJECT SPENDING - THIS MONTH │
├─────────────┬─────────────┬─────────────┬───────────────┤
│ PRJ-001 │ PRJ-002 │ PRJ-003 │ PRJ-004 │
│ $28,500 │ $45,200 │ $12,800 │ $8,500 │
│ ▲ 12% │ ▼ 5% │ ▲ 8% │ ─ 0% │
└─────────────┴─────────────┴─────────────┴───────────────┘

Export Options​

Export Segment Data​

FormatMethod
CSVSaved Search → Export
ExcelFinancial Report → Excel Export
PDFFinancial Report → Print
APIRESTlet with search results

Scheduled Reports​

Scheduled Report:
├── Report: Project Expense Summary
├── Segment Filter: All Active Projects
├── Frequency: Weekly (Monday 8:00 AM)
├── Recipients: project-managers@company.com
└── Format: PDF + Excel

See Also​