In my last article, I discussed how we can compare two date ranges. This time, we talk about non-standard periods.
Comparing a month to the last month or year to last year has been made easy by Power BI time intelligence functions. There are many ways you can achieve these results. But in this article, we take on a non-standard period comparison.
We have created a non-standard calendar, each with a period of 28 days and a year of 12 such periods. As part of the data modeling, we have enhanced this calendar to have an incremental period number and quarter no. So, basically, period now is the primary key for period-year. This will help us in easily achieving the desired comparison.
The calendar is loaded as Date table and also marked as the date table. We have also added the standard period (Month) and year in this calendar. This has been done to create a reference for what we achieve.
Other than, this we have sales data and we have joined the "sales date" with the date tables.
In the standard calendar, we can easily compare a month to last month and year to last year. Here we will try to do the same with our custom period and year.