Sample output from the Profitability Analysis by Segment prompt in the NetSuite AI Prompt Library, run against a NetSuite test account. Every name and number here is test data. Back to the post · The library

Segment finance · NetSuite TD3016323

Profitability Analysis by Segment

Revenue, gross margin, and contribution by location, product class, and department over the trailing twelve months, with the tagging gaps that limit what the segment view can say.

Prepared 2026-09-23 · Subsidiaries 1-3, elimination excluded · Source: NetSuite general ledger via SuiteQL · Prompt: Profitability Analysis by Segment, NetSuite AI Prompt Library v1 · Standard Review depth

Executive Summary

Measured on billed sales, the business has four operating segments by location and they are all profitable at the gross margin line, between 44% and 49%. Below gross margin the picture changes. The Los Angeles distribution center, the largest segment at $623,887 of revenue, keeps $29,377 after the operating expense assigned to it. Miami, the second largest at $393,564, loses $55,480 after its assigned expense: it carries $228,620 of operating cost against $173,140 of gross profit. The two retail stores are small and clean, $38,729 and $26,510 of contribution on almost no assigned cost.

The largest "segment" is the one with no location at all. Delivery service revenue of $682,677, 37% of billed sales, carries no location, no cost of goods, and no expense, and shows as pure contribution. It isn't. It is revenue whose costs are sitting in other segments or in the unassigned pool. Until it is tagged, every segment's contribution is understated by whatever share of that service it actually delivers, and Miami's loss may be partly an artifact of where the delivery cost landed.

Billed revenue, TTM
$1,837,558
invoices and cash sales
Segment gross margin range
44% to 49%
four locations
Miami contribution
-$55,480
after assigned operating expense
Revenue with no segment
37%
delivery service, untagged
Basis of preparation. The prompt's templates read the whole ledger by class and department. In this account 85% of income and 91% of cost of goods are posted by journal entries that carry no class, department, or location, so a segment P&L of the ledger as posted shows one "Unassigned" segment holding 91% of revenue and tells you nothing. This report therefore uses billing documents and their cost of goods postings, which are fully tagged, and it says so wherever a number depends on that choice.

Segment Profitability Ranking

Segments: location is the primary dimension, because it is the only one on which revenue, cost of goods, and operating expense are all tagged consistently in this account. Class and department views follow. Materiality: above 10% of revenue is material, 5 to 10% moderate, below 5% immaterial.

By location

RankSegmentRevenueShareCost of goodsGross profitMarginAssigned opexContributionMateriality
1Unassigned (delivery service)$682,67737.2%$0$682,677100.0%$500$682,177Material
201: San Francisco Store$83,8744.6%$43,145$40,72948.6%$2,000$38,729Immaterial
303: Los Angeles Distribution Center$623,88734.0%$337,181$286,70646.0%$257,329$29,377Material
402: New York Store$53,5572.9%$27,046$26,51049.5%$0$26,510Immaterial
505: Miami$393,56421.4%$220,424$173,14044.0%$228,620-$55,480Material
Delivery service (no location)$682,17701: San Francisco Store$38,72903: Los Angeles Distribution Cente$29,37702: New York Store$26,51005: Miami-$55,480

Contribution after assigned operating expense, by location. Blue positive, red negative.

By product class

RankSegmentRevenueShareCost of goodsGross profitMarginAssigned opexContributionMateriality
1Unassigned$698,54138.0%-$8,192$706,733101.2%$0$706,733Material
2Home & Decor$606,86533.0%$334,206$272,66044.9%$2,000$270,660Material
3Apparel$368,00520.0%$214,304$153,70141.8%$2,000$151,701Material
4Beauty$143,4977.8%$81,706$61,79143.1%$0$61,791Moderate
5Electronics$00.0%$765-$765n/a$0-$765Immaterial
6Miscellaneous$20,6501.1%$5,009$15,64175.7%$484,449-$468,808Immaterial

The class view has one anomaly worth a look: $484,449 of operating expense is tagged to the Miscellaneous class, which has $20,650 of revenue. Almost all of it is the Sales department's expense, tagged to a catch-all class rather than to the product lines it supports. It is the same problem as the delivery service, from the other side: cost with a segment but the wrong one.

By department

RankSegmentRevenueShareCost of goodsGross profitMarginAssigned opexContributionMateriality
1Unassigned$681,67737.1%-$885$682,562100.1%$4,350$678,212Material
2Warehouse Operations$997,62154.3%$560,851$436,77043.8%$150$436,620Material
3Store Operations$79,2414.3%$42,093$37,14846.9%$0$37,148Immaterial
4eCommerce$58,1903.2%$28,157$30,03451.6%$0$30,034Immaterial
5Production$19,8301.1%$5,326$14,50473.1%$0$14,504Immaterial
6Sales$1,0000.1%$510$49049.0%$483,949-$483,459Immaterial

Portfolio Matrix

Based on: revenue share against gross margin, for the four located segments.

QuadrantSegmentsReading
Large share, high marginLos Angeles Distribution Center (46%)The core of the business; its contribution is thin only because it carries the most assigned expense
Large share, lower marginMiami (44%)Two points below Los Angeles on margin, but negative after expense; the question is the expense, not the margin
Small share, high marginSan Francisco Store (49%), New York Store (50%)Best margins in the business on 7% of revenue combined; almost no expense assigned, so contribution is overstated
03: Los Angeles Distribution Cente46.0%05: Miami44.0%01: San Francisco Store48.6%02: New York Store49.5%

Cost Structure and Cross-Subsidization

Of $3,103,004 of operating expense in the ledger over the period, $487,949 is tagged to a location and the rest is not. Miami and Los Angeles absorb nearly all of the tagged expense. The stores absorb almost none. That is not evidence that the stores are cheap to run; it is evidence that store costs are booked without a location.

The cross-subsidy therefore runs in two directions at once. Delivery service revenue subsidizes nothing because it has no costs attached, and the stores appear to subsidize nothing because they have no costs attached either, while the two distribution centers carry expense that may belong partly to both. Any decision that depends on segment contribution, such as closing Miami, should wait until the tagging is fixed. Gross margin, which is tagged consistently, says all four segments are healthy.

Strategic Recommendations

Segment exit, major pricing changes, and reallocation of more than 20% of resources require human review under the prompt's controls. None is recommended.

Appendix: Data Lineage

IDTypeNameHandleScopeUsed forComplete
DL-001SuiteQLPosted P&L lines by class, department, location, and transaction typetransactionaccountingline, transactionline, account, accountingperiodPosting periods Sep 2025 to Aug 2026, subsidiaries 1-3All segment tablesYes

Adaptations from the prompt's templates: amounts come from transactionaccountingline by posting period rather than transactionline.amount by date; the segment dimensions are read from the transaction line, with location added to the template's class and department; journal entries are excluded from the segment tables for the reason given in the basis note, and their totals are disclosed; transaction.subsidiary is not exposed, so the elimination subsidiary is excluded through the line.

Query
SELECT NVL(BUILTIN.DF(tl.class),'Unassigned'), NVL(BUILTIN.DF(tl.department),'Unassigned'), NVL(BUILTIN.DF(tl.location),'Unassigned'),
       tl.subsidiary, a.accttype, t.type, SUM(-tal.amount) AS amt
FROM transactionaccountingline tal JOIN transaction t ON t.id = tal.transaction
JOIN transactionline tl ON tl.transaction = tal.transaction AND tl.id = tal.transactionline
JOIN account a ON a.id = tal.account JOIN accountingperiod ap ON ap.id = t.postingperiod
WHERE tal.posting = 'T' AND tl.subsidiary <> 4 AND a.accttype IN ('Income','COGS','Expense')
  AND ap.startdate >= DATE '2025-09-01' AND ap.enddate <= DATE '2026-08-31'
GROUP BY BUILTIN.DF(tl.class), BUILTIN.DF(tl.department), BUILTIN.DF(tl.location), tl.subsidiary, a.accttype, t.type

Appendix: Assumptions and Verification

AssumptionCategoryRationaleSensitivityImpact if wrong
Billing documents represent the operating businessBusiness logicJournals carry no segmentHighAll segment figures; disclosed
Location is the primary segmentMethodOnly dimension tagged on revenue, COGS, and opexMediumRanking
Assigned expense is correctly assignedDataEvidence above says it is not consistentHighContribution; flagged
No allocation of unassigned expenseMethodAllocation basis requires a human choiceHighContribution after full cost; not computed
TestObjectiveResult
G1-001Segment revenue reconciles to billing-document incomePass segment totals equal invoice and cash-sale income for the period
G1-002Every posted line carries a segmentFail {100*un['rev']/tot:.0f}% of billed revenue and most operating expense have no location
G2-001Contribution arithmeticPass computed in code; segment totals foot to the ledger totals
G2-002Materiality screenPass three material segments, one moderate, two immaterial

Confidence: 90% in segment gross margins; 50% in segment contribution, because expense assignment is demonstrably incomplete. The Miami finding is a data-quality finding first and a business finding second.

Analysis is read-only and derived from live SuiteQL. Customer- and vendor-specific actions require human review before any account change.SuiteStep, LLC