Power BI How-To / Retail Metrics
How to Calculate Same Store Sales in Power BI Without Skewed Comps
Power BI same store sales looks like one measure, but the number is only as trustworthy as the rule that decides which stores are comparable. This is the analyst’s version: the comparable-store rules, a snapshot table that freezes them, the DAX, and the remodel, relocation and 53-week traps that skew comps. If you want a finished multi-unit dashboard built for you instead, our Power BI for franchise owners page covers that.
What counts as same store sales in Power BI?
Same store sales, also called comparable or like-for-like sales, measure growth only from stores that traded through both the current period and the same period last year. In Power BI that means one rule decides which stores count, and both the current and prior-year measures use the same store list.
Total sales growth mixes three things: stores that genuinely sold more, stores that opened, and stores that closed. A chain that opens ten locations can post strong total growth while every existing store shrinks. Comps strip openings and closures out so the number answers one question — are the stores we already had doing better? Most store reports therefore show the measures side by side:
| Measure | Stores included | Question it answers |
|---|---|---|
| Total sales growth | Every store open in either period | Is the whole business bigger than last year? |
| Same store sales growth | Only stores comparable in both periods, identical set on both sides | Are existing stores selling more than they did? |
| Non-comp sales | New, closed, relocated or disrupted stores | How much of the change came from footprint, not performance? |
| Comp store count | Stores in the comparable base for the period | How broad is the base behind the comp percentage? |
Which stores should be in the comparable base?
A store belongs in the comparable base for a period only if it was open and trading normally for that whole period and for the matching period a year earlier. New openings, closed stores, and stores disrupted by a remodel, relocation or major expansion are excluded until both periods are clean again.
The exact thresholds are a finance policy, not a DAX decision, so write them down before building anything. Ferrari and Russo’s like-for-like comparison pattern (opens in new tab) handles openings and closures well; the situations below are the ones forum threads keep asking about, because a plain open-date and close-date check does not catch them:
| Situation | Usual comp treatment | Model input |
|---|---|---|
| New opening | Excluded until it has traded a full year plus the full matching period; some companies add a ramp-up buffer | Store[OpenDate] and a comp-threshold parameter |
| Permanent closure | Excluded from both years for every period it is not open, so its prior-year sales do not drag comps down | Store[CloseDate] |
| Remodel with closure | Excluded for the closed periods and for the matching periods a year later | A StoreEvents row with start and end dates |
| Remodel while trading | Usually stays comparable unless selling space changes beyond the policy threshold | A StoreEvents row flagged as not excluding |
| Relocation | Either a continuing store (same trade area) or a new store (new key), per policy | Same or new StoreKey, plus the closure gap as an event |
| Major expansion or downsizing | Excluded until the change has a full year of history | A StoreEvents row from the reopening date |
| 53-week year | Not a store rule: compare 52 weeks with 52 weeks, or restate the prior-year weeks | A week flag on the Date table |
Why use a snapshot table instead of a dynamic measure?
A snapshot table stores the comparable decision once per store and fiscal period, so every visual, export and finance reconciliation reads the same list. A purely dynamic measure re-derives the rule inside each cell from open and close dates, which is slower, hard to audit, and breaks once remodels and relocations need exceptions.
The model needs four pieces. A Store dimension with StoreKey, OpenDate and CloseDate. A StoreEvents table with StoreKey, EventType, StartDate, EndDate and an ExcludesFromComp flag, maintained from the real-estate or operations calendar. A Date table with a FiscalPeriodIndex column — on a week-based calendar, build it as shown in our Power BI 4-4-5 calendar guide, where the index is fiscal year × 12 + fiscal period. And the snapshot itself, CompSnapshot, with one row per store per fiscal period.
Build CompSnapshot upstream in Power Query or SQL rather than in DAX, so the logic sits where other reports can reuse it:
- Cross join every store with every fiscal period, carrying the period’s start and end dates and the start and end dates of the same period one fiscal year earlier.
- Set
IsCompto true only whenOpenDatefalls on or before the prior-year period start (pushed later by your ramp-up threshold),CloseDateis blank or after the current period end, and no excludingStoreEventsrow overlaps either the current period or the prior-year period. - Add a
Reasoncolumn (“Comp”, “New”, “Closed”, “Remodel closure”, “Relocated”) so a table visual can explain every exclusion. - Load it with no relationships. The measures apply it with TREATAS, which keeps the model free of ambiguous filter paths between Store, Date and the snapshot.
Here is how the rule plays out for a few illustrative stores in one fiscal period:
| Store | Prior-year period | Current period | IsComp | Reason |
|---|---|---|---|---|
| Store 101 | Open all period | Open all period | True | Comp |
| Store 102 | Not yet open | Open all period | False | New |
| Store 103 | Closed three weeks for a remodel | Open all period | False | Remodel closure |
| Store 104 | Open all period | Closed mid-period | False | Closed |
| Store 105 | Old site, open all period | New site, new key | False | Relocated |
What DAX returns same store sales and growth?
Three measures do the work. The first reads the comparable store and period pairs from the snapshot and filters sales to them. The second shifts the same pairs back one fiscal year. The third divides the difference by the prior-year figure, so both sides always describe an identical set of stores.
Comp Sales = VAR pairs = CALCULATETABLE( SUMMARIZE( CompSnapshot, CompSnapshot[StoreKey], CompSnapshot[FiscalPeriodIndex] ), CompSnapshot[IsComp] = TRUE(), TREATAS( VALUES( 'Date'[FiscalPeriodIndex] ), CompSnapshot[FiscalPeriodIndex] ), TREATAS( VALUES( Store[StoreKey] ), CompSnapshot[StoreKey] ) ) RETURN CALCULATE( [Total Sales], TREATAS( pairs, Store[StoreKey], 'Date'[FiscalPeriodIndex] ) )Comp Sales PY = VAR pairs = (same expression as above) VAR shifted = SELECTCOLUMNS( pairs, "StoreKey", CompSnapshot[StoreKey], "PeriodIndex", CompSnapshot[FiscalPeriodIndex] - 12 ) RETURN CALCULATE( [Total Sales], REMOVEFILTERS( 'Date' ), TREATAS( shifted, Store[StoreKey], 'Date'[FiscalPeriodIndex] ) )Comp Sales Growth % = DIVIDE( [Comp Sales] - [Comp Sales PY], [Comp Sales PY] )Comp Store Count = CALCULATE( DISTINCTCOUNT( CompSnapshot[StoreKey] ), CompSnapshot[IsComp] = TRUE(), TREATAS( VALUES( 'Date'[FiscalPeriodIndex] ), CompSnapshot[FiscalPeriodIndex] ), TREATAS( VALUES( Store[StoreKey] ), CompSnapshot[StoreKey] ) )
Because the pairs are evaluated per store and per period, a year-to-date visual counts a store only in the periods where it was comparable — a store that joins the base in period 7 contributes periods 7 onward on both sides, not its whole year. The prior-year measure shifts the same pairs rather than re-checking the rule, which is what keeps the two sides symmetric. The - 12 works because every fiscal year has 12 periods in the index above.
Why not just wrap [Total Sales] in a time-intelligence function? Microsoft’s SAMEPERIODLASTYEAR reference (opens in new tab) describes what it does: it returns the dates in the current context shifted one year back. It moves the dates, not the store list, so a store opened last month still adds current sales with no prior-year partner. On a week-based fiscal calendar a calendar-date shift also lands on different weekdays. Keep the snapshot at fiscal-period grain and use these measures in period-level visuals; if you need week-level comps, build the snapshot at week grain with a FiscalWeekIndex.
How do remodels, relocations and 53-week years skew comps?
Each one breaks the like-for-like assumption in a different way. A remodel closure removes weeks of trading from one year only. A relocation can turn one store into what is really a new store. A 53-week year adds a full extra week of sales to the current year.
- Remodels. A store closed for part of last year’s period shows inflated growth this year; a store closed this year shows a collapse. Exclude the affected periods on both sides through
StoreEvents, and keep the store in total sales so nothing disappears from the P&L view. - Relocations. Moving across the street and moving to a larger site in a new trade area are different events. Record the policy decision as data: same
StoreKeywith a closure event for a continuing store, or a new key with its ownOpenDatefor a store that should earn its way back into the base. - Expansions. Added selling space lifts sales without any improvement in the original footprint. If finance excludes expansions beyond a threshold, store the threshold decision as an excluding event from the reopening date.
- 53-week years. Period 12 of a 53-week year has an extra week, so comp growth for that period and the year jumps even if nothing improved. The two usual fixes are to drop week 53 from comp sales — add a
'Date'[InCompWeeks]flag that is false for fiscal week 53 and include'Date'[InCompWeeks] = TRUE()as a filter inComp Sales— or to restate the prior year so each current week compares with the matching shifted week. Agree which one with finance; our 4-4-5 calendar article covers how the extra week is placed.
Why do same store sales numbers disagree with finance?
Usually because the report and finance are using different rules, not different data. The common gaps are a different comp threshold, closed stores left in the prior year, relocations keyed as continuing stores, a calendar-month comparison against a fiscal-week one, and a 53rd week counted on one side only.
- Does the snapshot’s comp-threshold parameter match finance’s written policy?
- Are closed stores excluded from the prior year as well as the current year?
- Is every relocation keyed the way finance treats it?
- Are both report and finance comparing fiscal periods, not calendar months?
- Does the comp store count per period match finance’s comp list, store by store?
The last check is the fastest: put CompSnapshot in a table visual filtered to one period, export it, and compare it with finance’s list. Once the store lists match, the sales almost always do.
When should a senior engineer build it for you?
When the rule is agreed but the data is not ready: store open and close dates live in a spreadsheet, remodel closures are in email, or POS systems differ by location. A senior engineer can build the store events table, snapshot and measures, then reconcile them to the finance comp list.
The surrounding dashboards depend on the business. Store chains usually want comps next to basket and sell-through, as on our Power BI for retail page; multi-unit restaurants pair them with labor and prime cost, as on our Power BI for restaurants page; and if your sales come from Toast, the Toast POS Power BI dashboard page covers getting location-level sales into the model in the first place. Franchise networks add per-owner security on top, which the franchise owners page covers.
Related reading
Keep going with store reporting
FAQ
Frequently asked questions
Yes. Same store sales, comparable sales, comps and like-for-like sales all describe the same idea: growth measured only on stores that traded through both periods being compared. The labels differ by country and industry, but the modeling work in Power BI is identical, so pick one name and use it everywhere in the report.
No. SAMEPERIODLASTYEAR shifts the dates back one year, but it does not change which stores are included, so a store that opened this year adds sales to the current figure with nothing to compare against. You still need a fixed comparable store list applied to both the current and prior-year measures.
That is a policy your finance team sets, and it varies by company. The minimum is a full year of trading so a matching prior-year period exists. Many businesses wait longer so that opening promotions and early ramp-up do not inflate growth. Put the threshold in the snapshot logic as a single parameter.
Only if finance treats the move as the same store. If the new site serves the same customers and the business counts it as continuing, keep one key and exclude the closure gap. If the move changes the trade area or size, give it a new key so it re-enters the comp base as a new store.
Yes. A senior, US-based, Microsoft-certified engineer can build the store events table, the comparable snapshot and the 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. We quote the hours before starting.
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 comps your finance team will sign off on?
Bring your store list, open and close dates and comp policy 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
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