Power BI How-To / Retail Metrics

How to Build a GMROI Analysis in Power BI by Store, Category and Vendor

A Power BI GMROI analysis answers the buyer’s question: how much gross margin does each dollar of inventory earn, by store, category and vendor? It is a merchandising profitability measure for buyers and category managers, not a working-capital one. Our Power BI cash conversion cycle guide turns the same inventory balance into days for finance; this article builds the ratio merchants rank assortments by, including the average-inventory DAX most first attempts get wrong.

The definition fits on one line. Two things make the build harder than it looks: the numerator and the denominator live in different fact tables at different grains, and inventory cannot be added up over time the way sales can. Get those two right and slicing by store, category and vendor is ordinary DAX.

What is GMROI, and how does Power BI calculate it?

GMROI, gross margin return on inventory investment, divides gross margin dollars by the average cost of inventory held over the same period. A result of 3.0 means every dollar tied up in stock returned three dollars of margin. In Power BI it is two measures from different tables, divided at query time.

GMROI is easiest to read next to the inventory metrics it is often confused with. Each uses a different numerator or denominator, and each answers a different question:

GMROI compared with related inventory and margin metrics.
Metric Calculation Question it answers Usual owner
GMROIGross margin ÷ average inventory at costHow much margin does each dollar of stock earn?Buyers, category managers
Inventory turnsCost of goods sold ÷ average inventory at costHow many times did the stock sell through?Merchandising, supply chain
Gross margin %Gross margin ÷ net salesHow much of each sales dollar is margin?Merchandising, finance
Sell-through %Units sold ÷ units received (or available)How much of what we bought has sold?Buyers, planners
Days inventory outstandingAverage inventory ÷ cost of goods sold × daysHow long does cash sit on the shelf?Finance

The first two rows are linked: GMROI equals inventory turns multiplied by gross margin over cost of goods sold. That is why a low-margin line that turns quickly and a high-margin line that turns slowly can land on the same GMROI.

Why is average inventory a semi-additive measure?

Because inventory is a balance, not a flow. Stock on hand can be added across stores, categories and vendors on the same day, but never across days: thirty daily snapshots of $10,000 are still $10,000 of inventory. Month, quarter and year totals must average the snapshots instead of summing them.

A plain SUM over the snapshot table is the usual first mistake. It looks right in a single-day visual and inflates the denominator in every month, quarter and year column, so GMROI collapses as the period gets longer. The fix is to decide which balances make up “average inventory” and average exactly those:

Ways to compute average inventory for GMROI.
Method How it is computed Strength Weakness
Ending inventoryBalance on the last day of the periodSimplest; one snapshotSwings with a single receipt or clearance event; flatters GMROI after a markdown sell-off
Two-point average(Opening balance + closing balance) ÷ 2Easy to explainMisses seasonal peaks between the two dates
Month-end averageAverage of each month-end balance in the periodReflects the whole quarter or year; small tableNeeds a snapshot for every month-end
Daily or weekly averageAverage of every snapshot in the periodMost accurate for seasonal categoriesLarge snapshot fact; slower refresh

Some merchandising teams include the prior period’s closing balance, so a year averages thirteen month-ends instead of twelve. Whichever convention your team uses, write it on the report so nobody compares it with a figure built another way.

Which DAX measures build GMROI?

Four measures cover it: gross margin from the sales fact, inventory cost from the snapshot fact, an average of month-end inventory across the selected period, and the ratio itself wrapped in DIVIDE. An optional fifth annualizes the result so a single month can be compared with a full year.

The model comes first. Load an Inventory snapshot fact with one row per snapshot date, store and product, carrying CostOnHand at the same cost basis your cost of goods sold uses. Relate it, like the Sales fact, to shared Date, Store and Product tables, and keep Category and Vendor as columns on Product. The marked date table needs a Year Month column. Then:

Gross Margin = SUM ( Sales[NetSales] ) - SUM ( Sales[COGS] )

Inventory Cost = SUM ( Inventory[CostOnHand] )

Month-End Inventory Cost =
CALCULATE ( [Inventory Cost], LASTNONBLANK ( 'Date'[Date], [Inventory Cost] ) )

Avg Inventory Cost = AVERAGEX ( VALUES ( 'Date'[Year Month] ), [Month-End Inventory Cost] )

GMROI = DIVIDE ( [Gross Margin], [Avg Inventory Cost] )

GMROI Annualized = [GMROI] * DIVIDE ( 365, COUNTROWS ( 'Date' ) )

LASTNONBLANK (opens in new tab) finds the latest date in each month that actually has a snapshot, so a month whose snapshot landed a day early still returns a balance. AVERAGEX (opens in new tab) then averages those month-ends across whatever period the visual shows: in a month column the average is that month’s closing stock, and quarter and year columns average three or twelve of them. DIVIDE (opens in new tab) returns blank rather than an error where a store or item held no stock.

One caution: LASTNONBLANK looks across the whole filter context, so in a total across stores it picks the latest date on which any store has a row. If stores load snapshots on different days, align them to the same calendar month-end upstream, in Power Query or SQL, before they reach the model.

The annualized measure matters because a month of margin is set against inventory that is held all year. A monthly GMROI therefore reads at roughly a twelfth of the annual figure, and comparing it with an annual target makes every month look like a failure. Exclude the open month too: its margin covers only the days posted so far, while the day count covers the whole month. The closed-period flag in our cash conversion cycle article works the same way here.

How do you slice GMROI by store, category and vendor?

Put store, category and vendor on dimension tables shared by both the sales and inventory facts, then let the measure recompute the ratio in each cell. Never average the cell values in a total: a subtotal is total margin over total average inventory, which weights larger inventories more heavily.

The difference is easy to see with two categories. The figures below are illustrative arithmetic, not client data:

Illustrative example: why a GMROI subtotal is recomputed, not averaged.
Row Gross margin Average inventory at cost GMROI
Category A$40,000$10,0004.0
Category B$20,000$20,0001.0
Total (recomputed by the measure)$60,000$30,0002.0
Simple average of the two ratios——2.5 (wrong)

The measures above produce the 2.0 automatically. The 2.5 appears when someone stores GMROI in a calculated column or a summary table, or exports category ratios to Excel and averages them there. Each dimension then has its own modeling trap:

Modeling notes for the three usual GMROI slices.
Slice What to model Common trap
StoreInventory snapshot at store grain; distribution center stock as its own locationThe company total includes distribution center inventory that no store owns, so it can sit below every store’s figure. Show it as a separate row rather than hiding it.
CategoryCategory hierarchy on the Product table, shared by both factsItems re-classed mid-year land margin in one category and inventory in another if either fact stores its own category. Keep one current hierarchy on the dimension.
VendorPrimary vendor on Product, or vendor on receipts where items are multi-sourcedConsignment stock you do not own has no cost, so it produces blank or extreme ratios. Vendor rebates booked outside cost of goods sold also make some vendors look weaker than they are.

Why does GMROI disagree with the merchandising system?

Usually a definition mismatch, not bad data. The common gaps are inventory valued at retail instead of cost, ending rather than average inventory, an unannualized monthly figure compared with an annual target, vendor rebates and freight left out of cost of goods, and new items whose tiny average inventory inflates the ratio.

  • Retail versus cost. Stores on the retail inventory method often report stock at retail value. Convert it to cost before dividing, or GMROI reads too low.
  • Which cost of goods sold. Decide whether freight-in, shrink and vendor allowances sit inside COGS, and use the same definition the merchandising system uses. Our Power BI for wholesale distribution builds often need landed cost for exactly this reason.
  • Averaging method. Month-end, thirteen-point and daily averages give different denominators for the same year. Match the method before comparing values.
  • New and discontinued items. An item launched late in the year has a small average inventory and a large ratio. Set a minimum-history rule, much like the comparable-store rule in our same store sales guide, before ranking items.

The quickest reconciliation is at month-end: total the inventory snapshot at cost and compare it with the inventory balance in the general ledger. Once the denominators agree, remaining differences are almost always in the margin definition. When the snapshot itself is costed with FIFO layers, our Power BI FIFO inventory valuation guide covers why a rebuilt valuation can drift from the ledger balance.

How is GMROI different from the cash conversion cycle?

Both read the same inventory balance, but they answer different questions. GMROI tells a buyer or category manager how much margin each dollar of stock earns. Days inventory outstanding, inside the cash conversion cycle, tells finance how long cash sits on the shelf before it turns into a sale.

The data differs as well. Days inventory outstanding can come straight from the general ledger’s inventory control account, because finance looks at the business as a whole. GMROI needs item-level snapshots, because the ledger has no store, category or vendor split. Building both on one shared Date table lets finance and merchandising read the same month-end balance two ways.

When should a senior engineer build it for you?

When the definition is agreed but the data is not ready: inventory snapshots are not stored, the POS and ERP disagree on cost, or vendor and category hierarchies live in spreadsheets. A senior engineer can build the snapshot fact, shared dimensions and measures, then reconcile them to your ledger and merchandising reports.

Store chains usually want GMROI next to sell-through, markdowns and comps, as on our Power BI for retail page; distributors pair it with fill rate and turns by vendor and branch.

FAQ

Frequently asked questions

At cost. The numerator is gross margin dollars and the denominator is the average cost of inventory you own. Retailers using the retail inventory method often hold stock at retail value, so convert it to cost with the cost complement before dividing, or the ratio will read too low.

There is no single target. Acceptable GMROI depends on the category margin and how fast it turns, so a high-margin slow mover and a low-margin fast mover can both be healthy. Compare each category with its own history and with the target your merchandising team sets, always on an annualized basis.

No. Month-end snapshots are enough for most GMROI reporting, and they keep the inventory fact small. Daily or weekly snapshots give a more accurate average for highly seasonal categories, at the cost of a much larger table. Whatever the grain, load a row for every store and item that holds stock.

Blank means no inventory cost was found for the period, so DIVIDE returns blank instead of an error. Huge values usually come from items that sold through before a month-end snapshot, consignment stock carried at zero cost, or near-zero on-hand balances caused by negative stock adjustments. Flag those items rather than letting them top a ranking.

Yes. A senior, US-based, Microsoft-certified engineer can build the inventory snapshot, the shared store, product and vendor dimensions and the GMROI measures on your own data from prepaid Flex hours that never expire. Blocks are Starter $2,500, Growth $4,600 and Power $8,000, with hourly work from $100.

Try us risk-free for 4 hours

If you’re unhappy within the first 4 hours of your block, we’ll refund you in full — no questions asked. Hours are deducted only for work you’ve reviewed and approved, and they never expire.

Want GMROI your buyers and finance team both trust?

Bring your inventory extract and margin definition to a free demo — we scope it, you approve, and senior prepaid hours that never expire cover the work. Flex blocks are Starter $2,500, Growth $4,600 and Power $8,000, with hourly work from $100/hour.

Scope approved before any hours are used · Hours never expire

Book a free demo

See what your Power BI reporting would take

Tell us the task. We reply within one business day, and you get a scope estimate and the hours needed before any work begins.

Step 1 of 2: What do you need?

How can we help? Pick one

Tap to add, or type your own:

Step 2 of 2: Where should we reply?

Used only to contact you about this inquiry.

We reply within one business day. Scope approved before any hours are used. We don’t sell your information.

Tell us the task. We scope it, you approve, and a senior consultant delivers — typically in 3–5 business days. Prepaid hours that never expire.

  • Prepaid hours from $100/hour — and they never expire
  • Senior-led delivery — 20+ years on the Microsoft platform
  • Typical 3–5 business day turnaround
  • Full refund if you’re unhappy in your first 4 hours
Book my free demo