Every year someone in a Gulf company opens the sales report, sees February up 40% and March down 30%, and asks what went wrong. Usually nothing went wrong. Ramadan moved.
The Hijri year is about 11 days shorter than the Gregorian year, so Ramadan starts about 11 days earlier every year. In 2025 it started on 1 March. In 2026 it started on 18 February. In 2027 it will start around 8 February. Any comparison built on Gregorian months mixes Ramadan days with normal days, and the result looks like a trend when it is really the calendar.
Why SAMEPERIODLASTYEAR gets Ramadan wrong
SAMEPERIODLASTYEAR, DATEADD and the other time intelligence functions shift dates by Gregorian months. Ask for March 2026 against March 2025 and you compare 19 days of Ramadan plus Eid against 29 days of Ramadan. Two different months of behaviour, reported as one growth number.
For retail, food and telecom in the Gulf, Ramadan and Eid are some of the biggest weeks of the year. When the calendar pushes them from one month into another, your year over year numbers swing for reasons that have nothing to do with performance.
Step 1: add Hijri columns to your calendar
Power BI has no Hijri date functions, so the calendar table has to carry the answer. You need five columns: Hijri Year, Hijri Month Number, Hijri Day, Is Ramadan and Ramadan Day (1 to 30).
Our free DAX Calendar Table Generator builds all of them for you, using the official Umm al-Qura calendar. It embeds the Hijri month starts in a small DATATABLE inside the DAX, so there is no Power Query step and no external file. Tick Hijri, pick your date range, copy, and paste it as a new table.
Step 2: the Last Ramadan measure
Take the Ramadan days in the current filter as pairs of Hijri year and Ramadan day, move each pair one Hijri year back, and read those days. The pairs are what keep a card or a total row right: a card filtered to 2025 also holds the first weeks of Hijri 1447, so taking the latest Hijri year would point at Ramadan 2025 itself.
Sales Last Ramadan =
VAR _RamadanDays =
FILTER (
SUMMARIZE ( 'Calendar', 'Calendar'[Hijri Year], 'Calendar'[Ramadan Day] ),
NOT ISBLANK ( 'Calendar'[Ramadan Day] )
)
VAR _SameDaysLastYear =
SELECTCOLUMNS (
_RamadanDays,
"Hijri Year", 'Calendar'[Hijri Year] - 1,
"Ramadan Day", 'Calendar'[Ramadan Day]
)
RETURN
CALCULATE (
[Total Sales],
REMOVEFILTERS ( 'Calendar' ),
TREATAS ( _SameDaysLastYear, 'Calendar'[Hijri Year], 'Calendar'[Ramadan Day] )
)
REMOVEFILTERS drops the Gregorian dates from the filter, and TREATAS applies the shifted pairs, so Ramadan day 5 this year meets Ramadan day 5 last year, whatever Gregorian date each one fell on. On this year's side, count only the Ramadan days too, then the growth measure is the usual pattern:
Sales This Ramadan =
CALCULATE ( [Total Sales], KEEPFILTERS ( 'Calendar'[Is Ramadan] = TRUE () ) )
Ramadan Growth % =
DIVIDE ( [Sales This Ramadan] - [Sales Last Ramadan], [Sales Last Ramadan] )
If you do not have [Total Sales] and the other base measures yet, the DAX Measure Builder writes them for your own table and column names, together with YTD, rolling and standard year over year measures for the rest of the year.
Step 3: the chart that makes it obvious
Use a line chart. Put Ramadan Day on the X axis, Hijri Year in the legend and [Total Sales] in the values, then filter the visual to Is Ramadan = True. Each line is one Ramadan. Day 1 lines up with day 1, and the spike before Eid lines up with the spike before Eid.
The same trick works for Eid al-Fitr and Eid al-Adha. Filter on Hijri Month Number 10 or 12 and use Hijri Day on the axis.
Three things to watch
- Moon sighting. Umm al-Qura is the official Saudi calendar, and a local sighting can start Ramadan a day earlier or later. The generator's Announced Ramadan and Eid dates option uses the UAE's announced dates since 2018: see the Gulf calendar guide.
- 29 or 30 days. Ramadan 1446 had 29 days and Ramadan 1447 had 30. Day 30 has no partner last year, so it shows blank, which is correct. For totals, compare the average per day as well as the sum.
- Keep both views. Finance still closes the books on Gregorian months, so keep the normal year over year for them. Use the Ramadan view for sales, marketing and stock planning.
Ramadan 1448 is expected to start around 8 February 2027. Set the calendar up now and the first comparison will be ready on day one.