Two years of a Mandya wholesale and retail business, from the first summary card to the audit tests. The most useful findings are the numbers that look wrong.
All of this data is synthetic. H Mart, its customers, staff and brands were generated for teaching. Nothing here describes a real business.
₹17.66 croreNet sales, 01-04-2024 to 31-03-2026
8.8%Contribution margin, ₹1.56 crore
25,000Sales lines on 7,640 invoices
12Report pages over 126 measures
The business story
FMCG means fast-moving consumer goods: everyday items such as rice, soap and soft drinks that sell quickly, in large volumes, at thin margins. H Mart is headquartered in Mandya, Karnataka. It sells wholesale across the district with a ten-vehicle fleet and runs one retail showroom in Mandya city. It carries 180 products from 12 brands across six departments, from rice to baby food, and serves 340 customers.
Its owner has four questions. Are we growing profitably? Is stock in the right place? Do we deliver what we promise? Does marketing pay for itself? The report answers them in that order, then turns auditor and tests whether the numbers can be trusted. Any unfamiliar term is explained in the KPI glossary.
The model: a galaxy of three stars
Sales, stock and marketing happen at different grains, so each gets its own fact table. Shared dimensions let one slicer speak to all three. This is the report's Model view, read with the shapes from the Semantic Model lesson.
Model view of the H Mart report. Select it to open at full size.
Star
Each fact sits at the centre of its own dimensions. FactSales is the biggest star, with DimCustomer, DimSalesperson and DimVehicle around it.
Snowflake
One branch: DimSupplier reaches the facts only through DimProduct.
Star cluster
The two mixed: most dimensions stay flat and only Product branches, because that is all this business needs.
Galaxy
The whole model. The facts share DateTable, DimProduct, DimPlace and DimPromotion, so sales can sit beside stock or marketing spend in one visual.
The tables on the far right of the diagram have no relationships on purpose. They hold measures, slicer parameters and calculation groups, not business data.
Pick a fact to see which dimensions filter it.
DateTableApril to March calendar
DimProduct180 products
DimSupplier24, through DimProduct
DimPlace24 places
DimCustomer340 customers
DimSalesperson15 rows
DimVehicle11 rows
DimPromotion15 promotions
DimPriceList900 price rows
The report, page by page
Each page follows one layout: slicers and navigation, a row of cards, two charts, then a table to drill into. Figures in Power BI cards are in millions; the text below uses lakh and crore. Select a screenshot to open it at full size.
Executive Summary
Shown with FY 2024-25 selected in the slicer.
The question
Are we growing profitably?
The answer
Not quite. Net sales rose 6.3%, from ₹8.56 crore to ₹9.10 crore, while contribution fell from ₹79.45 lakh to ₹76.62 lakh. Margin slipped from 9.3% to 8.4%.
The lesson
Put a growth number and a margin number side by side. Either one alone tells a happier story.
Sales Performance
The question
Where do sales come from, and when?
The answer
Wholesale brings 96.6% of sales. The average invoice is ₹23,111. October is the peak in both years, and rice leads the categories at ₹2.42 crore.
The lesson
The YoY card reads 0.0% when no year is selected, because the previous-year calculation then returns the same two-year total. It only means something once a year is chosen.
Profitability
The question
What is left after the cost of serving?
The answer
Gross margin of 11.0% becomes 8.8% contribution. Retail earns 22.8% against wholesale’s 8.3%, so 3.4% of sales brings 8.8% of contribution. Soft drinks are thinnest at 6.7%.
The lesson
A small channel can matter more than its sales suggest. A channel slicer shows it; a total never will.
Inventory
The question
Is the stock right?
The answer
Stock of ₹85.83 lakh covers 22.1 days, or 3.2 weeks. Stockouts run at 0.8%, and 36 products need reordering.
The lesson
Stock is a snapshot, so never add it across weeks. The model keeps it in its own fact table, one row per week, product and location.
Distribution & Service
The question
Do we deliver what we promise?
The answer
On-time is 88.7% and fill rate 93.0%, yet OTIF is only 36.0%. A line counts as OTIF only if it arrives by the promised date and ships the exact quantity ordered.
The lesson
Strict measures expose what averages hide. So does the drill-down: distribution reads 100% in total, but within Baby Food individual brands reach far fewer customers.
Marketing & ROMI
The question
Does marketing pay for itself?
The answer
₹32.61 lakh of spend sits behind ₹3.54 crore of promotion sales, a ROAS of 10.85 times. But those sales earned only ₹12.62 lakh of contribution, so ROMI is −61.3%. Only Dasara Deepavali Mega, at +195%, returned more than it cost.
The lesson
ROAS counts sales and ROMI counts margin. On thin-margin FMCG they can point in opposite directions.
Sales Team & Logistics
The question
Is the team hitting its targets?
The answer
No: 38.6% of target over the two years, 37.4% in FY 2024-25 and 39.8% in FY 2025-26. An early version of this card said 926.3%, because with no date selected it compared 24 months of sales with one month’s target.
The lesson
Test every measure at the total and with no filters. The active count had a similar flaw: it included the “No Salesperson - Showroom” row, so it read 15 instead of 14 and sales per salesperson was wrong.
Now the auditor’s turn
Four pages use the BeIndian.Audit DAX library to ask a different kind of question: does this data behave as it should?
Audit: Descriptive Analytics
The reading
The average line is ₹7,063 and the median ₹2,028, with skewness of 3.77. A few big lines pull the average up, the largest being ₹1,24,038. At least one line lost ₹3,900.
The lesson
Start an audit by looking at the shape. Average alone would mislead you about a typical sale, and the minimum tells you where to look first.
Audit: Top N Percent
The reading
At the 10% setting, the top tenth of sales lines carries ₹9.75 crore, or 55.2% of sales. Chamundi and Cauvery Gold make up the top brands.
The lesson
Audit effort should follow value. Testing a tenth of the lines here covers more than half the rupees.
First digits of invoice amounts give a MAD of 0.0061, which the report labels acceptable conformity.
The lesson
Conformity is not proof of honesty, and a failure is not proof of fraud. Benford tells you where to look, not what you will find.
Audit: Brand Preference
The reading
Chamundi leads with 1,08,000 units (rounded), 14.2% of quantity, and ₹3.01 crore of sales. Mysuru Select is second by quantity but not among the top three by contribution.
The lesson
Volume and value are different league tables. The word cloud is a custom SVG measure, drawn entirely in DAX.
How this case study was built
The whole case study was vibe-coded from end to end: described in plain language, built by AI tools, then reviewed.
Synthetic data: an AI-written Python script generated every table, then checked that they reconcile.
Model and report: built with AI through the pbi-cli command-line tool.
Audit pages: built on the BeIndian.Audit DAX library.
So where was the human? Deciding what to build and judging what came back. The target measure ran with no error and read 926%, and it took someone who knew what the number meant to question it. That is why this site teaches concepts first. See Asking AI Well for the prompts.
KPIs in plain language
New to FMCG? These are the terms used on this page, with H Mart’s own figures for the full two years. Three pairs are easy to mix up, so they come first.
ROAS or ROMI?
H Mart spent ₹1 on marketing. That brought ₹10.85 of promotion sales, so ROAS looks excellent. But those sales left only about ₹0.39 of contribution, so it lost ₹0.61 on that rupee, and ROMI is −61.3%.
ROAS asks “how much did we sell?” ROMI asks “did we make money?”
On-time, fill rate or OTIF?
A shop orders 10 cartons for Monday.
10 arrive on Monday: on time and in full, so it counts for OTIF.
9 arrive on Monday: on time, but not OTIF, and the fill rate is 90%.
10 arrive on Tuesday: filled completely, but late, so neither on time nor OTIF.
One line can pass two tests and still fail OTIF, which is why H Mart scores 88.7% and 93.0% but only 36.0%.
Gross or contribution margin?
Sell rice for ₹100 that cost ₹89, and gross margin is ₹11. Delivery and promotion then cost another ₹2.20, leaving a contribution margin of ₹8.80.
Gross margin is profit on the product. Contribution margin is profit after serving the customer. These round figures match H Mart’s overall 11.0% and 8.8%.
Sales and profit
Net sales
Sales after discounts and returns, before tax. H Mart: ₹17.66 crore.
COGS
Cost of goods sold: what H Mart paid for the goods it sold.
Gross profit and gross margin
Net sales minus COGS. The margin is that profit as a share of net sales. H Mart: 11.0%.
Contribution margin
Gross profit minus logistics and promotion costs: what a sale really adds. H Mart: ₹1.56 crore, or 8.8%.
Logistics cost
The cost of getting goods to customers. H Mart: ₹30.01 lakh.
SKU
Stock keeping unit: one sellable item, such as a 5 kg bag of a particular rice. A 1 kg bag is a different SKU.
YoY
Year on year: this year compared with last year. FY means financial year, April to March.
Sales velocity
Net sales per selling day. H Mart: ₹2.42 lakh.
Target achievement
Net sales as a share of the sales target. 100% means the target was met exactly.
Stock
Inventory days and stock cover
How long today’s stock lasts at normal demand. H Mart: 22.1 days, which is 3.2 weeks.
Stockout rate
The share of stock positions with nothing left to sell in the latest weekly count. H Mart: 0.8%.
Reorder count
How many products need ordering again now. H Mart: 36.
Delivery and reach
Fill rate
Of every 100 units ordered, how many were shipped. H Mart: 93.0%.
On-time delivery
The share of order lines delivered by the promised date, even if some units were missing. H Mart: 88.7%.
OTIF
On time, in full: the share of lines delivered by the promised date and with the exact quantity ordered. H Mart: 36.0%.
Return rate
The share of shipped units that came back. H Mart: 0.3%.
Numeric distribution
Of all active customers, the share who bought the item. It counts shops, big or small.
Weighted distribution
The same shops, measured by their share of total sales. Reaching a few big shops can score higher than reaching many small ones.
Marketing
Marketing spend
Money spent on promotions. H Mart: ₹32.61 lakh.
Promotion sales mix
The share of net sales made under a promotion. H Mart: 20.0%.
ROAS
Return on advertising spend: promotion sales for each rupee spent. H Mart: 10.85 times.
ROMI
Return on marketing investment: promotion contribution minus spend, as a share of spend. Below zero means marketing cost more than it earned. H Mart: −61.3%.
Audit
Average, median and skewness
The median is the middle value. When a few very large values pull the average above it, the data is skewed, and skewness measures by how much.
Top N percent
The largest N percent of items, used to see how much of the total they carry.
Benford’s law
In many natural sets of amounts, about 30% start with the digit 1 and fewer than 5% with 9. A very different pattern is a reason to look closer.
MAD
Mean absolute deviation: the average gap between the actual and expected digit shares. Smaller means a closer match.
What to take away
Pair numbers that argue. Sales with margin, ROAS with ROMI, on-time with OTIF.
Model the grain honestly. Sales lines, weekly stock and marketing spend are three facts, not one wide table.
Distrust a number that flatters you. 926% was a filter-context bug that only showed at the total. It took one unfiltered check to catch it.
Then audit it. Shape, concentration, digits and preference take minutes once the functions exist.
Just exploring? Open the PBIX in a current version of Power BI Desktop. The data is already inside, so you need nothing else.
Want to refresh it? Unzip the data set so the files sit in C:\OneDrive\PowerBICourse\FMCG\data, the path the queries expect. For another folder, change each file under Transform data, then Data source settings.
Building your own? Start from the CSV files. data_dictionary.csv explains the columns.