Industry Practical: Three-Year Retail Analytics, Returns and Targets
Understand it in simple language
Use the retail case pack to practise a complete multi-table model. It contains 18,000 clean order lines from January 2023 through December 2025, a separate 18,060-row dirty extract, 24 products, 600 synthetic customer records, 782 return records, regional monthly targets, a calendar, and 36 monthly sales files. Currency is INR. All identities and transactions are synthetic.
Grain: Sales is one unique OrderLineID; two lines belong to each OrderID. Products and Customers have unique IDs. Returns contains return events referencing sales lines. Targets is one month-region row. Do not append the full Sales file to its monthly partitions: they represent the same sales.
Revenue is after the recorded line discount and before returns. Net revenue in this exercise subtracts all refunds attached to the selected original sales cohort, even when the refund occurred later. Refund-event-period reporting is a different metric. Targets are at region-month grain and cannot be meaningfully allocated to product categories without another business rule.
Do it step by step
- Download retail.zip, extract it, and read the case guide and answer sheets. Keep an untouched copy.
- In Desktop > Get data > Text/CSV, import Sales.csv, Products.csv, Customers.csv, Returns.csv, Targets.csv and Calendar.csv. Name queries Sales, Products, Customers, Returns, Targets and Calendar. Set dates to Date, quantities/IDs as appropriate, amounts to Fixed Decimal and DiscountPct to Whole Number. Inspect full-dataset quality.
- In a separate cleaning exercise, import Sales_Dirty.csv. Trim Region, remove duplicates on OrderLineID (18,000 remain), then quarantine invalid Quantity and unmatched ProductID rows. Use separate reference queries for accepted/rejected rows. Expect 48 quarantined and 17,952 accepted. Do not fill defects with guessed values. Compare accepted revenue with its own answer, not the complete clean dataset.
- For the clean model, relate Products[ProductID] (1) to Sales[ProductID] (), Customers[CustomerID] (1) to Sales[CustomerID] (), Calendar[Date] (1) to Sales[OrderDate] (), and Calendar[Date] (1) to Targets[MonthStart] (). Use Single direction. Mark Calendar as the date table. Create a Regions dimension from the four distinct region names and relate it to Sales and Targets. Use Regions fields in slicers.
- For the sales-cohort returns exercise, relate the unique Sales[OrderLineID] (1) to Returns[OrderLineID] (*) with Single filtering from Sales to Returns. Keep ReturnDate out of the active OrderDate calendar path. Explain this deliberate cohort definition; use a separate return-event calendar for a different business requirement.
- Create these measures separately:
Revenue = SUMX(Sales, Sales[Quantity] * Sales[UnitPrice] * (1 - Sales[DiscountPct] / 100))
Profit = SUMX(Sales, Sales[LineRevenue] - Sales[LineCost])
Margin = DIVIDE([Profit], [Revenue])
Orders = DISTINCTCOUNT(Sales[OrderID])
Refunds = SUM(Returns[RefundAmount])
Net Revenue = [Revenue] - [Refunds]
Revenue Target = SUM(Targets[RevenueTarget])
Target Attainment % = DIVIDE([Revenue], [Revenue Target])
Revenue PY = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Calendar'[Date]))
YoY % = DIVIDE([Revenue] - [Revenue PY], [Revenue PY])
Revenue YTD = TOTALYTD([Revenue], 'Calendar'[Date])
- Build cards, a monthly trend using YearMonth sorted by YearMonthSort, regional and product comparisons, and a detail page. Add year/region slicers; verify 2025 North revenue 7,243,185. Show target attainment at region/month level; explain why a product slicer does not allocate the region target.
- Repeat the linked industry labs for profiling, quarantine, folder append, merge, measures, time comparisons, returns, targets, drillthrough, bookmarks, Top N, formatting, export and scenarios. Their workbench calculations use the downloadable case rows.
- Reconcile the answer sheet, save screenshots of three filter states, document your model, and prepare a refresh/access/recovery handover.
Check your result
All-years clean revenue is 85,311,802.50; profit before returns is 36,700,522.50; refunds are 820,601.25; net revenue by original sales cohort is 84,491,201.25. Distinct orders: 9,000. Revenue 2024: 28,220,286.25; 2025: 28,385,120.00. The dirty accepted subset has revenue 85,039,610.00. Explain every difference before moving on.
If something goes wrong
If append doubles the total, you combined both the complete extract and its partitions. If merge multiplies lines, check lookup uniqueness. If target changes unexpectedly by product, inspect grain and filters. If returns disagree, compare sales-cohort dates with return-event dates. Never compare the quarantined subset with the complete clean reference as though they contain identical rows.
Practice data and learning method
Industry practice collection: downloadable retail, finance, HR and operations datasets, dictionaries, full walkthroughs and answer sheets. The cases contain multiple years, multiple related tables, deliberate data defects and known-answer checks. Progress from the small foundation files below to these cases; do not reuse the foundation totals for the larger datasets.
Download Sales.csv, Products.csv, and the dataset guide. These files contain synthetic training data, not real customers. Use the Power BI virtual labs for guided browser practice. Each lab states its supported operations. Then repeat the procedure above in the actual Microsoft tools and save evidence of your result. Try another filter or an intentionally incorrect setting and explain what changed before moving on.
Guided practicals for this topic
Virtual lab · Microsoft Power BI · 35 min
Reconcile returns and net revenue by sales cohort
Hands-on retail case: load the downloadable CSV tables, perform the actions, inspect the full-data result and reconcile it. Includes a paired Desktop procedure.
Virtual lab · Microsoft Power BI · 35 min
Compare revenue with monthly regional targets
Hands-on retail case: load the downloadable CSV tables, perform the actions, inspect the full-data result and reconcile it. Includes a paired Desktop procedure.
Continue learning from Microsoft
Power BI documentation · DAX reference · Power Query M reference · Power BI analyst skills map. Features, licensing, menus and availability can change; check the relevant official page for your environment.
Practise this topic
Hands-on virtual labs
Apply what you just read in a realistic, guided simulation. Free with a verified account.
Create a free account to track your progress and unlock virtual labs.