Data AnalyticsDAX measures and analytical correctness

Compare same-period sales when calendars differ

PK
Pankit Kumar
Sr. Data Scientist at Parexel (a Goldman Sachs–backed company) · 20 September 2026 · 3 min read
Technically reviewed by Ishaan Sharma
In this article (7 sections)

“Same period” can mean matching calendar dates, matching elapsed trading days or matching fiscal periods. Those definitions can select different records when years have different weekdays, holidays or leap days. Choose the business comparison before choosing the DAX function.

A technically valid date shift is not proof that the resulting periods are commercially comparable. Keep the selected date sets and their coverage visible during validation.

Establish a simple calendar comparison

Use FactDailyValue from the separate time-series fixture, related to DimDate. It supplies complete synthetic daily values through February 28, 2026.

January 1–February 28, 2026 contains 59 days at 2,000 paise, totaling 118,000. The matching 2025 dates contain 59 days at 1,000, totaling 59,000. The relative increase is 100% under this deliberately constructed calendar-date comparison.

This result is a fixture check, not a business-growth claim. The values were chosen to make the period arithmetic inspectable.

Shift dates under a stated function contract

For a contiguous selected period in a properly configured date-table model, an illustrative prior-year measure is:

dax
Daily Net Prior Year =
CALCULATE(
    [Daily Net Paise],
    DATEADD(DimDate[Date], -1, YEAR)
)

Select the intended January–February 2026 date range and compare the expected 59,000 prior-year result. DATEADD has date-column and newer calendar-based forms with documented behaviours; this example uses the date-column form. Review Microsoft's DATEADD reference for the form and selection constraints in your model.

Inspect the shifted dates at boundaries rather than assuming every function maps leap days or month ends according to your business preference.

Decide how leap days should be treated

A February period can contain 28 or 29 days. Comparing complete months therefore gives different exposure lengths in a leap year. The report may still require complete-month comparison, but it should acknowledge that choice.

Alternative policies include comparing the first 28 days, comparing equal trading-day counts or using average value per eligible operating day. Each changes the denominator or population and answers a different question.

Do not quietly drop February 29 because it complicates a formula. Record the policy and test the exact date mapping, including how any leap-day value enters the total.

Use a business calendar for trading-day comparisons

If the question is performance after the first ten trading days, assign a trading-day index within each relevant period using an authoritative calendar. Match those indices rather than merely subtracting a year from a date.

Weekends alone are insufficient when regional holidays, closures or varying schedules matter. A store-specific comparison may need a calendar keyed by store or operating group, not one global weekday flag.

Keep the calendar version and owner with the model. Calendar corrections can change comparisons without any transaction being edited.

Handle fiscal structures explicitly

A 4-4-5 calendar or a 53-week fiscal year does not align naturally with ordinary calendar months. Use the organization's defined fiscal period and comparable-period mapping.

If a special week is excluded from one comparison, show the excluded value and the reason. An adjustment that makes growth look smoother can also hide real activity if it is not transparent.

Avoid labelling a calendar-year shift as a fiscal comparison simply because the visual uses fiscal-looking text labels.

Match completeness and population

Compare complete elapsed periods or label partial periods clearly. A current period missing its final source file should not be compared with a fully loaded prior period as though both were complete.

Also consider changes in business population, such as newly opened stores or products. A same-store view can help isolate a specific question, but display total-business performance separately when expansion matters.

The fixture's Python controls verify the simple matched calendar totals. DAX execution, alternate calendars and leap-day policies require explicit application tests; no general calendar comparison is claimed validated by that one fixture.

Exercise: design a comparison between a 29-day February and a 28-day February under two different policies. List the exact included dates and write a label that explains each result without calling both simply “same period.”

NeuraPath's Data Analytics with Generative AI course connects time intelligence with business-calendar reasoning. A defensible comparison makes the date mapping and exposure differences visible.

Continue learning

This article is part of the DAX measures and analytical correctness sequence. Use the neighbouring tasks when you need the prerequisite or the next application.

PK
Pankit Kumar
Lead Instructor, NeuraPath Academy

Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.

This article is part of our Data Analytics with Generative AI programme — 3–4 months. The full analyst stack — Excel, SQL, Power BI and Python pipelines — then a generative-AI layer you can prove is right.

Explore Data Analytics with Generative AI
Counselling is free · no obligation

Not sure which programme fits?

Tell us your background and we will map it to the right entry point — including saying so when a cheaper programme is the better fit. A counsellor replies within one working day.