Skip to main content
Like-for-like (LFL) sales, also called same-store sales, comparable store sales, or comps, compares a period with the same period last year and counts only the stores that are comparable in both. It separates growth in your existing stores from growth that comes from opening new ones. Outside retail, the same idea goes by same-site growth, same-property growth, or organic growth. This guide builds LFL measures in a topic. A user picks any period, and the measures work out last year and the comparable store set for that period. No dates are written into the model. The examples use Blobby’s Home & Garden, a made-up retailer with 42 stores and synthetic data. From February to April 2026 its total sales grew 9.0% and its like-for-like sales grew 6.7%. The difference is two new stores and one store that doesn’t count until May.

What the report shows

A like-for-like report usually shows the same few numbers for each product group. This simplified example uses round figures:
Example table of three product groups. Garden goes from £40 to £60, growth of 50%, weighting 50%, contribution 20 points. Heating goes from £30 to £36, growth of 20%, weighting 30%, contribution 6 points. Tools goes from £30 to £24, growth of minus 20%, weighting 20%, contribution minus 6 points. All products go from £100 to £120, growth of 20%, weighting 100%, contribution 20 points.
In plain terms:
  • Net sales is everything sold in the period, in every store.
  • Like-for-like (LFL) sales is the same figure, counting only stores that were also trading a year ago. A new store can’t make it look better.
  • LFL growth is how much more those same stores sold than a year ago.
  • Weighting is how big a slice of like-for-like sales each product group is. The slices add up to 100%.
  • Contribution is how many points of the total growth each product group added. The points add up to total growth.
Weighting and contribution answer different questions. Heating and Tools are similar in size, but Heating added 6 points of growth and Tools took 6 away. Garden is half of sales and grew fastest, so it added 20 points.

When to use this pattern

Use this pattern when both of these are true:
  • The set of stores changes. Stores, branches, restaurants, or clinics open during the periods you compare, and you need growth for the comparable ones only.
  • People choose their own period. A week, a quarter, or the year to date must return the same like-for-like number in every report.
If your store set never changes, period-over-period analysis gives the same comparison with no modeling. The steps handle stores that join the comparable set. They don’t cover stores that close or pause trading.

Requirements

To follow the steps in this guide, you’ll need:
  • Modeler or Connection Admin permissions for the connection, so you can edit the shared model
  • A sales view with a sale date, a sales amount, and a store key. The examples use sales.sale_date, sales.net_sales, and sales.site_id.
  • A stores view with the date each store opened. The examples use stores.opening_date.
  • A topic that joins the two views. The examples use a like_for_like topic with sales as the base view. The fields in this guide reference both views, so they go in the topic’s views parameter.
  • A products view joined to the topic, for the report in the last two steps. The examples use products.category and products.subcategory.
1

Add a last-year measure

In the topic file, add a measure with a date_offset_from_query filter. The filter takes the date filter of the query and moves it back one year. cancel_query_filter stops the query’s own date filter from applying to this measure as well.
like_for_like.topic
A query filtered to February through April 2026 now returns this year’s sales and last year’s sales side by side. In the example, Net Sales is £4,757,794 and Net Sales LY is £4,365,612, which matches a query filtered to February through April 2025.
A query that uses this measure must have a filter on sale_date. Refer to Troubleshooting for the error you get without one.
2

Define when each store counts

Add a dimension to the stores view that holds the first date a store counts as like-for-like. This example counts a store from one year after it opens:
like_for_like.topic
If your stores table already holds this date, point sql at that column instead.Next, add two dimensions to the sales view that test each sales row against that date:
like_for_like.topic
The two tests are different on purpose:
  • This year’s test keeps a sale if the store was comparable on the sale date.
  • Last year’s test keeps a sale if the store is comparable one year after the sale date, which is the matching day this year.
Grid of four stores by month for last year and this year. Maple Hill counts in every month of both years. Riverside counts from May in both years. Harbour and Park Gate are new stores, so their sales are not counted.

A store's sales count in both years from the date the store becomes comparable. New stores don't count in either year.

Both years then use the same stores. With one test for both years, last year’s sales for a store that became comparable this year would be left out, and growth would be overstated.
3

Add the like-for-like measures

Add a measure for each year, each with its own row test, and a growth measure that divides one by the other:
like_for_like.topic
4

Check the result

In a workbook, query the topic with the total measures and the like-for-like measures, and filter sale_date to a period. For February through April 2026, the example returns:To see which stores explain the difference, add the store name and LFL From Date. Three stores have sales that the like-for-like measures leave out:Total sales less these stores equals like-for-like sales in both years.In the example model, Riverside’s date is set by hand to May 1, 2026, to show a store that becomes comparable part of the way through a period. Its sales count from May in both years:
Omni table of Riverside sales by month from February to July 2026. LFL Sales and LFL Sales LY are zero from February to April and equal Net Sales and Net Sales LY from May to July.
5

Add weighting and contribution

Weighting and contribution, described in What the report shows, both divide a row by a total across all rows. A level of detail measure provides that total.Add a total for each year that ignores the product grouping, then the two ratios:
like_for_like.topic
In always_exclude, list the product dimensions that the report groups by. Leave out the quarter, so that each quarter gets its own total. The totals still respect the filters of the query, so a report filtered to one department shows each row’s share of that department.
6

Build the report

In a workbook, select the product dimensions, a quarter field, and the four measures. Pivot the quarter, add subtotals by category, and filter sale_date to the period that covers both quarters.
Omni table of like-for-like sales by category and subcategory, with fiscal quarters Q1 and Q2 pivoted across the top. Each quarter shows LFL Sales, Weighting, LFL Growth, and Contribution to LFL Growth, with a subtotal row for each category and a total row.

Like-for-like sales by product group for two quarters, with category subtotals. Synthetic data.

Use these checks to confirm the report is right:
  • Weightings add up to 100% in each quarter.
  • Contributions add up to total growth. In Q1 the six product groups contribute 7.56 points, and total like-for-like growth is 7.6%.
  • Subtotals are calculated again, not averaged. In Q2 the three Garden & Outdoor groups grew 12.2%, 3.5%, and 1.9%. Their subtotal is 6.3%, which is the growth of their combined sales.

Follow a retail calendar

Retailers commonly report on a 4-4-5 calendar, or a close variant such as 4-5-4. Each quarter is 13 whole weeks, split into months of 4, 4, and 5 weeks. Every period starts on the same weekday, so a week, month, or quarter always has the same number of weekends as the same period last year. A calendar month can’t promise that. In Omni, this is a custom calendar. You keep a table with one row for each date and the retail week, month, quarter, and year that the date belongs to, and you map it once in the model file. Any date dimension that uses the calendar then groups, filters, and compares by retail periods. On a retail calendar, last year must mean the matching retail period, not the same dates. Apply the calendar to a date dimension, and add last-year measures that filter on that dimension:
like_for_like.topic
On this dimension the offset counts the calendar’s periods, so 1 year means the same retail period last year. lfl_sales needs no retail version, because it has no offset. Filter sale_date_retail to a named period, such as this quarter, then group by any of its timeframes. Each row sits beside the matching retail period last year. The examples below are filtered to retail Q2 of 2026, which runs from May 3 to August 1. By quarter. Net sales are £5,397,276 against £4,929,932 last year. The last-year figure is sales for May 4 to August 2, 2025, which is retail Q2 of 2025. Like-for-like sales are £5,265,518 against £4,929,932, growth of 6.8%. By month. Each retail month is compared with the same retail month last year: By week. The 13 weeks of the quarter fall into retail months of 4, 4, and 5 weeks. Each week is compared with the same retail week last year, so the weekdays line up:
Omni table of thirteen retail weeks grouped by retail month, with Net Sales and Net Sales LY (retail calendar). Retail month 2026-04 has four weeks, 2026-05 has four weeks, and 2026-06 has five weeks. Each retail month has a total row.

One retail quarter on a 4-4-5 calendar: retail months of 4, 4, and 5 weeks, each week beside the same retail week last year. Synthetic data.

Keep these rules in mind:
  • Name the period in the filter. A filter on specific dates moves back by a Gregorian year. Refer to Period over period for the rules.
  • Keep the calendar table ahead of today. A filter such as this quarter ends at the start of the next retail quarter. If the calendar table stops before that date, the query returns no rows.
  • The row tests still use calendar dates. is_lfl_ly_row adds one calendar year to the sale date, and a 52-week retail year is 364 days. A store that becomes comparable inside the period can start counting one day apart in the two years.
Without a custom calendar, an offset of 364 days in place of 1 year also keeps weekdays lined up. In the example, sales for the week of February 16, 2026 are 31.6% above the week one calendar year earlier, and 7.4% above the week 364 days earlier.

Ask the Omni Agent

Because the logic is in the model, people can also ask like-for-like questions in the Omni Agent, without anyone building a report first. These questions were tested on the example model:
  • “Is our sales growth in February to April 2026 coming from existing stores or from new ones?”
  • “Which stores are left out of like-for-like for February to April 2026, and why?”
  • “Which three stores had the best comps in February to April 2026?”
People use many names for the same number. List them in the topic’s ai_context, and say which measures answer them:
like_for_like.topic
To check that the agent uses your measures, run an eval. Write the questions people ask, in the words they use, add the known answers as expectations, and run the set again after each model change. On the example model, a set of 25 questions was run before and after adding the context above:
  • Before: 24 of 25 passed. Clear labels were enough for the agent to find LFL Sales, LFL Sales LY, and LFL Growth. The one miss was “comparable store sales growth”. The agent read “store” literally and left out the online sites.
  • After: 25 of 25 passed.

Troubleshooting

The query fails with “Invalid offset filter”

The full message is Invalid offset filter in filter on measure "sales_ly": No filter for field "sales.sale_date" in query. The last-year measures need a date filter to move back, and the filter must be on the field named in the measure. A filter on a different date field, such as a fiscal year from a joined date view, doesn’t count. Add a filter on sale_date to the query. To start every new query with one, add default_filters to the topic.

Period over period shows a different growth rate

The workbook’s period-over-period analysis applies one measure to both periods. On LFL Sales, it uses this year’s row test for last year too, so stores that became comparable this year drop out of last year. Compare LFL Sales with LFL Sales LY instead.

Next steps