{"id":1861,"date":"2026-09-02T12:47:41","date_gmt":"2026-09-02T12:47:41","guid":{"rendered":"https:\/\/entri.app\/explore\/?post_type=curriculum&#038;p=1861"},"modified":"2026-09-02T12:47:41","modified_gmt":"2026-09-02T12:47:41","slug":"dax-time-intelligence-and-related-functions","status":"publish","type":"curriculum","link":"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/","title":{"rendered":"DAX Time Intelligence and Related Functions"},"content":{"rendered":"<h2><strong><b>What Are DAX Time Intelligence and Related Functions in Power BI?<\/b><\/strong><\/h2>\n<p>DAX time intelligence functions \u2014 such as TOTALYTD(), SAMEPERIODLASTYEAR(), and DATEADD() \u2014 shift the date context of a calculation to compare periods like this year vs. last year. The RELATED() function is a separate DAX tool that pulls a column value from a related table into the current row&#8217;s context.<\/p>\n<h3><strong><b>DAX Time Intelligence Functions<\/b><\/strong><\/h3>\n<ul>\n<li><b><\/b><strong><b>TOTALYTD() \/ TOTALQTD() \/ TOTALMTD(): <\/b><\/strong>calculates year-, quarter-, or month-to-date totals.<\/li>\n<li><b><\/b><strong><b>SAMEPERIODLASTYEAR(): <\/b><\/strong>shifts the date context back one year for comparison.<\/li>\n<li><b><\/b><strong><b>DATEADD(): <\/b><\/strong>shifts dates forward or backward by a specified interval (day, month, year).<\/li>\n<li><b><\/b><strong><b>DATESYTD() \/ DATESBETWEEN(): <\/b><\/strong>returns a table of dates for a year-to-date range or a custom range.<\/li>\n<li><b><\/b><strong><b>PARALLELPERIOD(): <\/b><\/strong>returns a set of dates shifted by a full period, such as the previous quarter.<\/li>\n<\/ul>\n<h3><strong><b>Why Time Intelligence Needs a Proper Date Table<\/b><\/strong><\/h3>\n<p>Time intelligence functions require a proper Date table marked as the model&#8217;s official date table (Model View \u2192 Mark as Date Table); without this, functions like SAMEPERIODLASTYEAR() can return inconsistent results even on correctly structured data.<\/p>\n<h3><strong><b>The RELATED Function in DAX<\/b><\/strong><\/h3>\n<p>RELATED() pulls a column value from a related table into the current row context, typically used inside a calculated column on the &#8220;many&#8221; side of a one-to-many relationship \u2014 for example, pulling a Category name from a Products table into a row of a Sales table.<\/p>\n<h3><strong><b>RELATED vs. RELATEDTABLE<\/b><\/strong><\/h3>\n<p>While RELATED() returns a single value from the &#8220;one&#8221; side of a relationship, RELATEDTABLE() does the reverse \u2014 it returns every matching row from the &#8220;many&#8221; side when starting from the &#8220;one&#8221; side, and is typically used inside an aggregation function.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>How to Calculate Year-over-Year Growth with DAX Time Intelligence<\/b><\/strong><\/h2>\n<p>This 6-step tutorial builds a year-over-year growth measure using SAMEPERIODLASTYEAR(), the most common real-world time intelligence use case in Power BI.<\/p>\n<h3><strong><b>Prerequisites<\/b><\/strong><\/h3>\n<ul>\n<li>A properly marked Date table in the model<\/li>\n<li>A base sales-style measure already created<\/li>\n<\/ul>\n<h3><strong><b>Steps<\/b><\/strong><\/h3>\n<ul>\n<li><b><\/b><strong><b> Confirm the Date table is marked: <\/b><\/strong>Model View \u2192 right-click the Date table \u2192 Mark as Date Table (skip if already done).<\/li>\n<li><b><\/b><strong><b> Create a base measure: <\/b><\/strong>Total Sales = SUM(Sales[Amount]).<\/li>\n<li><b><\/b><strong><b> Build the prior-year measure: <\/b><\/strong>PY Sales = CALCULATE([Total Sales], SAMEPERIODLASTYEAR(&#8216;Date'[Date])).<\/li>\n<li><b><\/b><strong><b> Calculate growth percentage: <\/b><\/strong>YoY Growth % = DIVIDE([Total Sales] &#8211; [PY Sales], [PY Sales]).<\/li>\n<li><b><\/b><strong><b> Format the result as a percentage: <\/b><\/strong>Use the Modeling ribbon to set the measure&#8217;s format to Percentage.<\/li>\n<li><b><\/b><strong><b> Add both measures to a line chart: <\/b><\/strong>Plot Total Sales and PY Sales over time to visually confirm the comparison looks correct.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>What Are DAX Time Intelligence and Related Functions in Power BI? DAX time intelligence functions \u2014 such as TOTALYTD(), SAMEPERIODLASTYEAR(), and DATEADD() \u2014 shift the date context of a calculation to compare periods like this year vs. last year. The RELATED() function is a separate DAX tool that pulls a column value from a related [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"template":"","meta":{"_acf_changed":false},"curriculum-category":[92,90,91],"custom_linking_tags":[],"class_list":["post-1861","curriculum","type-curriculum","status-publish","hentry","curriculum-category-introduction-to-bi-and-power-bi","curriculum-category-power-bi","curriculum-category-power-bi-tutorials"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>DAX Time Intelligence and Related Functions<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DAX Time Intelligence and Related Functions\" \/>\n<meta property=\"og:description\" content=\"What Are DAX Time Intelligence and Related Functions in Power BI? DAX time intelligence functions \u2014 such as TOTALYTD(), SAMEPERIODLASTYEAR(), and DATEADD() \u2014 shift the date context of a calculation to compare periods like this year vs. last year. The RELATED() function is a separate DAX tool that pulls a column value from a related [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"Entri Free Materials\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/\",\"url\":\"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/\",\"name\":\"DAX Time Intelligence and Related Functions\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/explore\/#website\"},\"datePublished\":\"2026-09-02T12:47:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/entri.app\/explore\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DAX Time Intelligence and Related Functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/entri.app\/explore\/#website\",\"url\":\"https:\/\/entri.app\/explore\/\",\"name\":\"Entri Free Materials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/entri.app\/explore\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/entri.app\/explore\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/entri.app\/explore\/#organization\",\"name\":\"Entri Free Materials\",\"url\":\"https:\/\/entri.app\/explore\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/explore\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/wp-cdn.entri.app\/explore\/2025\/03\/logo.svg\",\"contentUrl\":\"https:\/\/wp-cdn.entri.app\/explore\/2025\/03\/logo.svg\",\"caption\":\"Entri Free Materials\"},\"image\":{\"@id\":\"https:\/\/entri.app\/explore\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DAX Time Intelligence and Related Functions","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/","og_locale":"en_US","og_type":"article","og_title":"DAX Time Intelligence and Related Functions","og_description":"What Are DAX Time Intelligence and Related Functions in Power BI? DAX time intelligence functions \u2014 such as TOTALYTD(), SAMEPERIODLASTYEAR(), and DATEADD() \u2014 shift the date context of a calculation to compare periods like this year vs. last year. The RELATED() function is a separate DAX tool that pulls a column value from a related [&hellip;]","og_url":"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/","og_site_name":"Entri Free Materials","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/","url":"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/","name":"DAX Time Intelligence and Related Functions","isPartOf":{"@id":"https:\/\/entri.app\/explore\/#website"},"datePublished":"2026-09-02T12:47:41+00:00","breadcrumb":{"@id":"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/entri.app\/explore\/power-bi\/dax-time-intelligence-and-related-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/entri.app\/explore\/"},{"@type":"ListItem","position":2,"name":"DAX Time Intelligence and Related Functions"}]},{"@type":"WebSite","@id":"https:\/\/entri.app\/explore\/#website","url":"https:\/\/entri.app\/explore\/","name":"Entri Free Materials","description":"","publisher":{"@id":"https:\/\/entri.app\/explore\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/entri.app\/explore\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/entri.app\/explore\/#organization","name":"Entri Free Materials","url":"https:\/\/entri.app\/explore\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/explore\/#\/schema\/logo\/image\/","url":"https:\/\/wp-cdn.entri.app\/explore\/2025\/03\/logo.svg","contentUrl":"https:\/\/wp-cdn.entri.app\/explore\/2025\/03\/logo.svg","caption":"Entri Free Materials"},"image":{"@id":"https:\/\/entri.app\/explore\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/entri.app\/explore\/wp-json\/wp\/v2\/curriculum\/1861","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/entri.app\/explore\/wp-json\/wp\/v2\/curriculum"}],"about":[{"href":"https:\/\/entri.app\/explore\/wp-json\/wp\/v2\/types\/curriculum"}],"author":[{"embeddable":true,"href":"https:\/\/entri.app\/explore\/wp-json\/wp\/v2\/users\/2"}],"wp:attachment":[{"href":"https:\/\/entri.app\/explore\/wp-json\/wp\/v2\/media?parent=1861"}],"wp:term":[{"taxonomy":"curriculum-category","embeddable":true,"href":"https:\/\/entri.app\/explore\/wp-json\/wp\/v2\/curriculum-category?post=1861"},{"taxonomy":"custom_linking_tags","embeddable":true,"href":"https:\/\/entri.app\/explore\/wp-json\/wp\/v2\/custom_linking_tags?post=1861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}