Close Menu
SkytikSkytik

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    At Least 32 People Dead After a Mine Bridge Collapsed Due to Overcrowding

    November 17, 2025

    Here’s how I turned a Raspberry Pi into an in-car media server

    November 17, 2025

    Beloved SF cat’s death fuels Waymo criticism

    November 17, 2025
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    SkytikSkytik
    • Home
    • AI Tools
    • Online Tools
    • Tech News
    • Guides
    • Reviews
    • SEO & Marketing
    • Social Media Tools
    SkytikSkytik
    Home»AI Tools»How to Implement Three Use Cases for the New Calendar-Based Time Intelligence
    AI Tools

    How to Implement Three Use Cases for the New Calendar-Based Time Intelligence

    AwaisBy AwaisNovember 25, 2025No Comments11 Mins Read0 Views
    Facebook Twitter Pinterest LinkedIn Telegram Tumblr Email
    How to Implement Three Use Cases for the New Calendar-Based Time Intelligence
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Introduction

    about Time Intelligence in DAX in the past.

    However, the new Calendar-based Time Intelligence feature rewrites the rulebook, as some concepts will change, and the required techniques will be simpler than before.

    Anyway, the time intelligence functions remain the same, even though we must use them slightly differently. But almost everything will be easier than before.

    In this piece, I will discuss three use cases for which I would have needed to write complex DAX code.

    Now, let’s discuss the use cases.

    Use-Cases

    Financial calendar

    When working with financial data, it may be necessary to account for more than 12 months to manage extra bookings. Some companies used such extra months to ensure consistency with the regular bookings.

    Until now, this has only been possible with custom DAX code.

    Now we can create a custom calendar and use the standard time intelligence functions with it.

    This use case has the following requirements:

    1. We must cover 15 months per year.
    2. We need two views: One for the booking months and one where the additional months are mapped to December.
    3. We are looking at PY data; we must see all days, including leap years (29th of February).

    Weekly calculations

    I already wrote about weekly calculations. It involved custom DAX code, as there was no WDT function, and it wasn’t possible to calculate the previous year based on weeks.

    Again, this can now be done easily with a calendar that contains week information, along with the new TOTALWTD() and DATESWTD() functions.

    Weekly Calculation with Fiscal Years

    Weekly Calculations are even more complicated when we must account for fiscal years that do not match calendar years.

    Even such a scenario can now be solved with standard time intelligence functions when the calendar table contains the correct information.

    Prerequisites

    The first prerequisite is to enable the Preview feature:

    Figure 1 – Enabling the Preview feature in Power BI Desktop (Figure by the Author)

    Another prerequisite is to create a date table that covers the required periods.

    As before, a well-crafted date table is key for working with Time Intelligence, and now even more so with the new feature.

    When working with the new Time Intelligence possibilities, we need three steps:

    1. We build a date table and define which columns we need to cover each use case.
    2. Then we define a calendar for this table by assigning the columns to the periods, like year, quarter, months, weeks, and dates.
    3. Create DAX measures using the calendar defined in step 2.

    The first two steps are equally important, as the table must be carefully crafted to cover the required periods.

    The calendar definition allows us to use the columns in the date table to assign them to predefined categories. Shortly, you will see what this means.

    I will describe the content of the date table with sample data for each use case.

    Case 1: Financial Calendar

    First of all, I create a table containing the following information:

    • Years
    • Semesters (1 & 2 plus a third for the additional months)
    • Quarters (1 – 4 and a fifth Quarter for the additional months) 
    • Month 1 – 15
    • Month Names for all 15 months (Jan – Dec, and Additional Month 1 – 3)
    • 31 Days for each month, even for the months that normally have fewer than 31 days
    • The Quarter and the Months where the Additional months are mapped to December

    This is how it looks with two examples per column:

    Column NameExample
    ID_Date20060101
    20061301
    Date_Real2006.01.01
    N/A
    Year2006
    ID_Month200601
    200613
    Month1
    13
    Day1
    Date_German01.01.2006
    01.13.2006
    Date_EN01/01/2006
    01/13/2006
    MonthNameJanuary
    Additional Month 1
    MonthNameShortJan
    Add Month 1
    YearMonthNameJanuary 2006
    Additional Month 1 2006
    YearMonthNameShortJan 2006
    Add Month 1 2006
    Semester1
    3
    SemesterNameSemester 1
    Semester 3
    YearSemester20061
    20063
    YearSemesterNameSemester 1 2006
    Semester 3 2006
    Quarter1
    5
    QuarterNameQuarter 1
    Quarter 5
    YearQuarter20061
    20065
    YearQuarterNameQuarter 1 2006
    Quarter 5 2006
    CalendarMonth1
    12
    CalendarMonthNameJanuary
    December
    CalendarMonthNameShortJan
    Dec
    CalendarYearMonth200601
    200612
    CalendarYearMonthNameJanuary 2006
    December 2006
    CalendarYearMonthNameShortJan 2006
    Dec2006

    The two examples are one for January and one for the first additional month.

    Here, a different view of the data for the additional columns and rows:

    Figure 2 – Examples for the columns for the additional months (Figure by the Author)

    In my case, I’ve built this table in SQL, but it can be done in any other programming language, including Power Query.
    You only need multiple lists of numbers and combine them.

    You can find an example of how to combine tables with lists of numbers in this article.

    But the key point is that I am free to define the Calendar’s content. Even the Date column doesn’t need to contain real dates, as, in my case, there are only strings in it.

    After importing the new calendar into Power BI, we can open the new “Calendar options” dialog after clicking on the table:

    Figure 3 – Open the new Calendar options dialog in Power BI Desktop (Figure by the Author)

    Now, I will create two new calendars.

    Please note that I cannot set the new table as a date table, as it contains non-existent “dates”, such as 30. February.

    I click on “Add Category” to add, for example, the Year, Month, and Month of Year, and assign the columns with the data to them:

    Figure 4 – The definition of the Financial calendar with the new Calendar options (Figure by the Author)

    When setting up the calendar, remember to click on the “Validate data” button after adding each category. This helps you in finding errors in the data, if they exist.

    This button checks whether each value has a many-to-one relationship to each value in the category above.

    For example, each month must belong to one year. The category “Month” must contain the month and the year, while the “Month of the Year” must contain only the month.

    As the primary column, I selected the ID columns, and for the Associated columns, I selected the naming columns with different formats and languages.

    Please check the links in the References section below for detailed information about how this feature works.

    To have a calendar, where the additional months are assigned to December, I set up the following Calendar:

    Figure 5 – Configuration of the Financial (Real) Calendar (Figure by the Author)

    I didn’t set up columns for the Quarter in the “Real” calendar because I don’t need them in my scenario.

    To calculate the PY for Online Sales, I can use the SAMEPERIODLASTYEAR() function. But instead of using a Date column, I pass the name of the Financial calendar:

    Online Sales Fin PY = 
    CALCULATE([Sum Online Sales],
                SAMEPERIODLASTYEAR('Financial_Calendar')
                )

    When looking at the results for the leap year, I get this:

    Figure 6 – The PY value for the year after a leap year (Figure by the Author)

    And when looking at the results for the additional months, I get this:

    Figure 7 – Results for the additional months. On the left, you see the additional months. On the right, you see the sum of December plus the additional months added together and assigned to December (Figure by the Author)

    As you can see, the PY is calculated correctly for the additional months.

    In addition, in the right table, you can see the values from December and the additional months (from the left table) added together into December by using the “Real” calendar.

    To have such a solution with a simple measure is groundbreaking.

    Now, let’s look at weekly calculations.

    Case 2: Weekly Calculation

    This time, I want to calculate the PY per week.

    As I already showed how to define custom calendars, I will only show you the content of the involved columns and how they are assigned to the calendar.

    This time, I used existing columns from my date table:

    YearOfWeekWeekKeyYear/WeekWeekDateDay of WeekDay of Week Name
    20252025012025/1130/12/20241Monday
    20252025012025/1131/12/20242Tuesday
    20252025012025/1101/01/20253Wednesday
    20252025012025/1102/01/20254Thursday
    20252025012025/1103/01/20255Friday
    20252025012025/1104/01/20256Saturday
    20252025012025/1105/01/20257Sunday
    20252025522025/525222/12/20251Monday
    20252025522025/525223/12/20252Tuesday
    20252025522025/525224/12/20253Wednesday
    20252025522025/525225/12/20254Thursday
    20252025522025/525226/12/20255Friday
    20252025522025/525227/12/20256Saturday
    20252025522025/525228/12/20257Sunday

    As you can see, the [YearOfWeek] column is tied to the week, not the calendar year. I did this to ensure the correct assignment of the week to the Year. Without this, the Calendar Validation would have failed, as the [WeekKey] column for the first calendar week of each year would have been assigned to two different years.

    This shows how important it is to build a consistent calendar table.

    Here is the definition of the weekly calendar:

    Figure 8 – Definition of the Weekly calendar (Figure by the Author)

    And here are the results for the measure using this calendar:

    Figure 9 – Results using a simple measure using SAMEPERIODLASTYEAR() and the Weekly Calendar (Figure by the Author)

    As before, the measure uses a simple SAMEPRIODLASTYEAR() call and uses the newly created “Weekly Calendar”:

    Online Sales PY Week = CALCULATE([Sum Online Sales]
                                    ,SAMEPERIODLASTYEAR( 'Weekly Calendar' )
                                    )

    Compare this to the complex code you had before introducing this new feature to calculate a consistent weekly-based PY measure.

    Here are the results of a measure using the new WTD measures:

    Figure 10 – Results for the WTD Measures (Figure by the Author)

    Here are the measures used:

    Online Sales WTD = 
        VAR WtdDates = DATESWTD('Weekly Calendar')
    
    RETURN
        CALCULATE([Sum Online Sales]
                    ,WtdDates
                    )
    Online Sales PY WTD = 
        CALCULATE([Online Sales WTD]
                    ,SAMEPERIODLASTYEAR('Weekly Calendar')
                    )

    It’s almost unbelievable how easy it is to create these measures.

    Case 3: Weekly Calculation with Fiscal Years

    This one is more complex.

    In this case, the Fiscal Year starts on the first day of August.

    This means that the first week of the Fiscal year is the week with the Fiscal year’s first day.

    I set up all the columns in the Date table; this is an extract of the needed columns:

    FiscalYear ForWeekFiscalYear WeekSortFiscalWeekSortFiscal Week/YearFiscal WeekDateFiscalDay OfWeekDay of Week Name
    25/2625260111 – 25/26128/07/20251Monday
    25/2625260111 – 25/26129/07/20252Tuesday
    25/2625260111 – 25/26130/07/20253Wednesday
    25/2625260111 – 25/26131/07/20254Thursday
    25/2625260111 – 25/26101/08/20255Friday
    25/2625260111 – 25/26102/08/20256Saturday
    25/2625260111 – 25/26103/08/20257Sunday
    25/262526525252 – 25/265220/07/20261Monday
    25/262526525252 – 25/265221/07/20262Tuesday
    25/262526525252 – 25/265222/07/20263Wednesday
    25/262526525252 – 25/265223/07/20264Thursday
    25/262526525252 – 25/265224/07/20265Friday
    25/262526525252 – 25/265225/07/20266Saturday
    25/262526525252 – 25/265226/07/20267Sunday

    Again, I must have an additional column for the Fiscal Year assigned to the weeks.

    But this time, I must create a separate table with the needed columns. For some reason, using these columns from the Date table doesn’t work. Any attempt to use these columns resulted in a weird effect.

    You can read more about this here.

    In the end, I added a calculated table with the needed columns:

    Fiscal-Week Date = 
    CALCULATETABLE(
    		SUMMARIZECOLUMNS(
    				'Date'[FiscalYearForWeek]
    				,'Date'[Fiscal Week/Year]
    				,'Date'[FiscalWeekSort]
    				,'Date'[Day of Week Name]
    				,'Date'[Day of Week]
    				,'Date'[Date]
    				,'Date'[DateKey])
                ,NOT ISBLANK('Date'[FiscalYearForWeek] )
                )

    The calendar created on this table looks like this:

    Figure 11 – Configuration of the Fiscal-Week calendar (Figure by the Author)

    The measure to calculate the Sales for the previous year is, again, straightforward:

    Online Sales PY (Fiscal Week) = 
        CALCULATE([Sum Online Sales]
                    ,SAMEPERIODLASTYEAR('Fiscal-Week Calendar')
                    )

    These are the results:

    Figure 12 – Results for the PY of the Fiscal Week Calendar (Figure by the Author)

    You can see that the result aligns perfectly with the week and weekday of the previous year, even though the dates are shifted.

    This is exactly what I expected.

    Conclusion

    This new feature changes everything regarding Time Intelligence with DAX.

    But, although we can simplify our DAX measures, we must take extra care when crafting our date tables. It’s all about having the correct content.

    It’s interesting that Microsoft already recommends using this feature, even though it’s only been available for a few months since its introduction as a Preview feature.

    My recommendation is to look into it. Read the articles linked below. Test it with your specific scenarios and decide whether it’s worth switching existing solutions to this feature.

    I absolutely will use this feature when starting new solutions.

    The only drawback is that it can increase the number of date tables in the data model. Until now, I have used a single central date table for everything. Now, I may need to create separate date tables for specific scenarios. But this can introduce complexity when combining different aspects of the data model. This would introduce additional challenges in interpreting the data.

    Think of it for one moment:

    Is it really a good idea to have two different calendars on one page? Are the results still comparable? Can this confuse your consumers?

    I will absolutely avoid such scenarios. Comparing results by month and by week on the same pages, or even in the same report, makes little sense to me.

    Stay tuned for more content on this topic. Will write more about it over time when I encounter interesting scenarios.

    References

    Here, the Microsoft documentation for calendar-based time intelligence: Implement time-based calculations in Power BI – Power BI | Microsoft Learn.

    This SQL BI article explains this new feature in great detail: Introducing Calendar-based Time intelligence in DAX – SQLBI.

    Like in my previous articles, I use the Contoso sample dataset. You can download the ContosoRetailDW Dataset for free from Microsoft here.

    The Contoso Data can be used freely under the MIT License, as described in this document. I changed the dataset to shift the data to contemporary dates.

    CalendarBased cases Implement Intelligence Time
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Awais
    • Website

    Related Posts

    DynaTrust: Defending Multi-Agent Systems Against Sleeper Agents via Dynamic Trust Graphs

    March 19, 2026

    Linear Regression Is Actually a Projection Problem, Part 1: The Geometric Intuition

    March 19, 2026

    AI frameworks: building business intelligence

    March 19, 2026

    Did You Check the Right Pocket? Cost-Sensitive Store Routing for Memory-Augmented Agents

    March 19, 2026

    Why the Best AI Use Cases in Marketing Start with Intelligence, Not Creation

    March 19, 2026

    Efficient High-Resolution Visual Understanding for Vision-Language Models

    March 19, 2026
    Leave A Reply Cancel Reply

    Top Posts

    At Least 32 People Dead After a Mine Bridge Collapsed Due to Overcrowding

    November 17, 20250 Views

    Here’s how I turned a Raspberry Pi into an in-car media server

    November 17, 20250 Views

    Beloved SF cat’s death fuels Waymo criticism

    November 17, 20250 Views
    Don't Miss

    DynaTrust: Defending Multi-Agent Systems Against Sleeper Agents via Dynamic Trust Graphs

    March 19, 2026

    arXiv:2603.15661v1 Announce Type: new Abstract: Large Language Model-based Multi-Agent Systems (MAS) have demonstrated remarkable collaborative…

    Introducing new collaboration features for Inoreader Teams

    March 19, 2026

    Stop competing with your own content

    March 19, 2026

    Linear Regression Is Actually a Projection Problem, Part 1: The Geometric Intuition

    March 19, 2026
    Stay In Touch
    • Facebook
    • YouTube
    • TikTok
    • WhatsApp
    • Twitter
    • Instagram
    Latest Reviews

    Potato Chips Are My Chicest Party Trick

    March 19, 2026

    Did You Check the Right Pocket? Cost-Sensitive Store Routing for Memory-Augmented Agents

    March 19, 2026
    Most Popular

    13 Trending Songs on TikTok in Nov 2025 (+ How to Use Them)

    November 18, 20257 Views

    How to watch the 2026 GRAMMY Awards online from anywhere

    February 1, 20263 Views

    Corporate Reputation Management Strategies | Sprout Social

    November 19, 20252 Views
    Our Picks

    At Least 32 People Dead After a Mine Bridge Collapsed Due to Overcrowding

    November 17, 2025

    Here’s how I turned a Raspberry Pi into an in-car media server

    November 17, 2025

    Beloved SF cat’s death fuels Waymo criticism

    November 17, 2025

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    Facebook X (Twitter) Instagram Pinterest YouTube Dribbble
    • About Us
    • Contact Us
    • Privacy Policy
    • Terms & Conditions
    • Disclaimer

    © 2025 skytik.cc. All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.