Home / Power BI / Pragmatic Guides - DAX Date and Time Functions
Pragmatic Guides - DAX Date and Time Functions
Master DAX Date & Time functions in Power BI with this focused guide. Justin Vogel shows how to calculate differences, format values, and analyze time-based data for stronger time intelligence and reporting.
The Pragmatic Guides – Date and Time Functions course provides a focused, hands-on exploration of essential DAX functions for working with dates and times in Power BI. Each module is dedicated to a single function, allowing you to quickly understand its purpose, syntax, and common use cases. Whether you’re calculating date differences, formatting time values, or building rolling period measures, this course equips you with the practical knowledge needed to manage and analyze time-based data effectively. Justin Vogel breaks down each function in an approachable way, making this a go-to resource for analysts, developers, and Power BI users who want to sharpen their DAX skills and confidently handle date and time calculations.
Course Outline ( Free Preview)
Module 01 - Introduction
Justin kicks off the series with how this guide works: one function per lesson, real examples, and quick wins you can use immediately in Power BI. You’ll see where date/time functions fit in a typical model, common pitfalls they solve, and how they pair with visuals and measures. By the end of this intro, you’ll know exactly what you’ll learn and how to apply it.
Module 02 - Why Use DAX?
Before diving into functions, Justin explains why DAX is the right tool for time-based analysis. You’ll learn how DAX enables rolling periods, point-in-time reporting, and calendar intelligence that simple transforms can’t achieve. He also covers where to use calculated columns vs. measures for flexible, performant models.
Module 03 - CALENDAR12 min.
Create a rock-solid date table with CALENDAR. Justin shows how to define start/end dates, add essential columns (year, month, quarter), and connect the table to your facts. You’ll leave with a dependable foundation for all time intelligence.
Module 04 - CALENDARAUTO8 min.
Prefer an automatic date table? CALENDARAUTO scans your model to infer the correct range. Justin demonstrates when this is convenient, when to override the defaults, and how to extend the auto table with the attributes your reports need.
Module 05 - DATE9 min.
Build valid dates from separate year, month, and day fields using DATE. This lesson covers common modeling patterns (e.g., combining dimension columns), handling invalid inputs, and preparing consistent dates for relationships and calculations.
Module 06 - DATEDIFF7 min.
Measure the gap between two dates with DATEDIFF—in days, months, quarters, or years. Justin walks through practical uses like customer tenure, SLA tracking, and elapsed time KPIs, plus tips for choosing the right unit for your story.
Module 07 - DATEVALUE5 min.
Turn text into a true date using DATEVALUE. You’ll learn how to fix inconsistent imports, handle cultures/formats, and make formerly “texty” dates behave correctly in filters, hierarchies, and time intelligence.
Module 08 - DAY7 min.
Extract the day component from a date for precise filtering and labeling. Justin shows how to use DAY in custom aggregations, daily cohorts, and tidy date labels that make charts easier to read.
Module 09 - EDATE5 min.
Shift dates by whole months with EDATE. Perfect for “same day next month” comparisons, renewal reminders, or rolling windows, you’ll learn to move forward or backward in time reliably—even across variable month lengths.
Module 10 - EOMONTH5 min.
Need month-end values? EOMONTH returns the last day of a month at a chosen offset. Justin uses it to anchor balances, create month-to-date cutoffs, and drive end-of-period metrics that finance teams love.
Module 11 - MONTH, QUARTER, YEAR9 min.
Quickly derive MONTH, QUARTER, and YEAR for grouping, sorting, and hierarchies. You’ll build clean labels (e.g., “Q3 2025”) and learn best practices for sorting Month Names by Month Number for beautiful timelines.
Module 12 - HOUR, MINUTE, SECOND10 min.
Pull out time parts with HOUR, MINUTE, and SECOND to analyze intraday activity. Justin covers patterns like peak-hour usage, service windows, and time-of-day cohorting for more granular insight.
Module 13 - NOW, TODAY8 min.
Use NOW and TODAY for dynamic, “as of” calculations. Learn when these values refresh, how they affect row vs. filter context, and ways to create current-period flags and real-time KPIs without surprises.
Module 14 - WEEKDAY, WEEKNUM8 min.
Work with weeks the right way using WEEKDAY and WEEKNUM. Justin explains week-start conventions, ISO options, and aligning with business calendars so your weekly metrics match stakeholder expectations.
Module 15 - TIME6 min.
Construct valid time values from hour, minute, and second with TIME. You’ll combine it with DATE for full timestamps and drive analyses like operating hours, cutoff times, and time-based slicers.
Module 16 - TIMEVALUE5 min.
Convert text-based times to true time values using TIMEVALUE. This is your fix for messy imports and mixed formats, enabling accurate sorting, arithmetic, and filtering on time columns.
Module 17 - UTCNOW, UTCTODAY7 min.
Work across regions with UTCNOW and UTCTODAY. Justin shows why UTC matters for global data and how to adjust to local time using your date table or offsets so your “current” really is current—everywhere.
Module 18 - NETWORK DAYS6 min.
Count working days between two dates while excluding weekends and holidays. Justin demonstrates the business-days pattern (using a holiday table or a working-day flag) to calculate lead times, SLAs, and schedules that reflect reality.
Module 19 - YEARFRAC9 min.
Calculate the fraction of a year between two dates with YEARFRAC. Use it to prorate amounts, compute age or tenure precisely, and spread values across periods with professional-grade accuracy.
Module 20 - Class Wrap Up2 min.
Justin recaps the key functions and when to use each, tying them back to common reporting needs. You’ll get a quick decision guide for picking the right function, plus next-step ideas for layering in full time-intelligence patterns.
Justin Vogel taught high school Advanced Placement® psychology and academic research for 15 years. He holds an MS in Psychology and spent several summers teaching psychology to educators new to the subject. He has also scored AP exams, reviewed textbooks for the Florida Department of Education, and written exam questions for test banks. He has presented at professional learning conferences at the local and national level and now puts his teaching and presentation skills to use on the Power BI team at Pragmatic Works.