<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Date Table: To use start of and end of year dates or not in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264209#M120804</link>
    <description>&lt;P&gt;Ok thanks for your help&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2023 15:04:03 GMT</pubDate>
    <dc:creator>akhaliq7</dc:creator>
    <dc:date>2023-06-01T15:04:03Z</dc:date>
    <item>
      <title>Date Table: To use start of and end of year dates or not</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3263848#M120770</link>
      <description>&lt;P&gt;If I am creating a date table does the table contain dates from the beginning of the year to the end of the year even if those dates don't exist in the fact table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;fact table date range: 02/02/2022 - 01/06/2023&lt;/P&gt;&lt;P&gt;date table range: 01/01/2022 - 31/12/2023&lt;/P&gt;&lt;P&gt;this is recommended by most power bi instructors and tutors online. But when using date related dax functions the date table becomes disfunctional. An example of a date function when this happens:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Last 12 Months V1 =
CALCULATE ( 
      [Total Sales],
      DATESINPERIOD ( 'Date'[Date],          -- returns period from date column
                      MAX ( 'Date'[Date] ),  -- starting from MAX date
                      -12,                   -- shifting it back 12 intervals
                      MONTH                  -- each interval being a month
      )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something? or do you create a copy date table for dax functions?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 12:43:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3263848#M120770</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-06-01T12:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table: To use start of and end of year dates or not</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264086#M120788</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307422" data-lia-user-login="akhaliq7" class="lia-mention lia-mention-user"&gt;akhaliq7&lt;/a&gt;&amp;nbsp;Date table in Power BI is fundamental table if you need to do time intelligence calculation. I would say, there is nothing disfunctional with Date table in Power BI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you mark your Date table as Date table? Sometimes I forget to do it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 14:18:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264086#M120788</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-06-01T14:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table: To use start of and end of year dates or not</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264106#M120792</link>
      <description>&lt;P&gt;Yes but I am asking if a date table range is 01/01/2022 - 31/12/2023 and the fact table range is 02/02/2022 - 01/06/2023 and you use MAX('Date'[Date]) then you get the valuw 31/12/2023 then when you use this for a time intelligence function such as dates in period like I have done in the function in my question then you get all sales amount from the date range 01/01/2023 - 31/12/2023 but that is not what I want I want the date range 01/06/2022 to 01/06/2023 so what I don't get is why use max 'date'[date] and why have dates to the end of the year if it incorrectly affects your time intelligence functions&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 14:26:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264106#M120792</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-06-01T14:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table: To use start of and end of year dates or not</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264109#M120793</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307422" data-lia-user-login="akhaliq7" class="lia-mention lia-mention-user"&gt;akhaliq7&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Last 12 Months V1 =
IF (
    NOT ISEMPTY ( Sales ),
    CALCULATE (
        [Total Sales],
        DATESINPERIOD (
            'Date'[Date],
            -- returns period from date column
            MAX ( 'Date'[Date] ),
            -- starting from MAX date
            -12,
            -- shifting it back 12 intervals
            MONTH -- each interval being a month
        )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Jun 2023 14:27:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264109#M120793</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-01T14:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table: To use start of and end of year dates or not</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264110#M120794</link>
      <description>&lt;P&gt;Yes I mark my date tables as a date table&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 14:28:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264110#M120794</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-06-01T14:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table: To use start of and end of year dates or not</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264131#M120796</link>
      <description>&lt;P&gt;Thanks, what I don't get is why have the date table range to the end of the year if work arounds are required in dax. why not just use the max date in sales as the last date in the date table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason I don't is because having watched many courses this is recommended to have the last date in the date table to be the end of year for the max date in the sales table so if the max date in the sales table is 01/06/2023 then the last date in the date table is recommended to be 31/12/2023.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 14:36:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264131#M120796</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-06-01T14:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table: To use start of and end of year dates or not</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264152#M120800</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307422" data-lia-user-login="akhaliq7" class="lia-mention lia-mention-user"&gt;akhaliq7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is no special requirement then you don't have to. Just use min, max.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 14:42:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264152#M120800</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-01T14:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table: To use start of and end of year dates or not</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264209#M120804</link>
      <description>&lt;P&gt;Ok thanks for your help&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 15:04:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-To-use-start-of-and-end-of-year-dates-or-not/m-p/3264209#M120804</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-06-01T15:04:03Z</dc:date>
    </item>
  </channel>
</rss>

