<?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 Understanding DATESYTD, DATESBETWEEN and similar functions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/694493#M647</link>
    <description>&lt;P&gt;I am trying to &lt;STRONG&gt;understand&lt;/STRONG&gt; what is happening beneath the surface with functions like DATESYTD and DATESBETWEEN.&amp;nbsp; The scenario:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A measure [Total]&lt;/LI&gt;&lt;LI&gt;A calendar table Calendar with columns Date, Year, Month, Day&lt;/LI&gt;&lt;LI&gt;A matrix with rows Year, Month and value [Total]&lt;/LI&gt;&lt;LI&gt;Some YTD measures (below)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Measure 1 - Using TOTALYTD - ok&lt;/P&gt;&lt;P&gt;Measure 2 - Using CALCULATE and DATESYTD&lt;/P&gt;&lt;P&gt;Measure 3 - Using CALCULATE and DATESBETWEEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All three work as expected and produce the expected result.&amp;nbsp; Curiosity has me wondering how the 2nd and 3rd are doing so relative to the &lt;EM&gt;matrix layout&lt;/EM&gt;.&amp;nbsp; In my expressions I do&amp;nbsp;&lt;U&gt;not&lt;/U&gt; refer to of modify (clear) the filters on Year, Month, Day.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given DATESYTD and DATESBETWEEN return a single column table.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I wrote the expression using the custom technique with FILTER then I'd need to &lt;STRONG&gt;explicitly&lt;/STRONG&gt; clear the filters on those columns or the entire Calendar table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume DATESYTD and DATESBETWEEN are doing this but is there any &lt;EM&gt;documented details&lt;/EM&gt; on &lt;STRONG&gt;how&lt;/STRONG&gt; these functions work?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Measure 2 = CALCULATE ( [Total, DATESYTD ( 'Calendar'[Date] ) )
Measure 3 = CALCULATE ( [Total], DATESBETWEEN ( 'Calendar'[Date], STARTOFYEAR ( 'Calendar'[Date] ), LASTDATE ( 'Calendar'[Date] ) ) )&lt;/PRE&gt;&lt;P&gt;Note, am not concerned about the theory of other functions (unless they relate to this topic), am well aware of when and how simple functions like MAX/MIN should be used.&lt;/P&gt;</description>
    <pubDate>Mon, 20 May 2019 03:32:55 GMT</pubDate>
    <dc:creator>Cymbolz</dc:creator>
    <dc:date>2019-05-20T03:32:55Z</dc:date>
    <item>
      <title>Understanding DATESYTD, DATESBETWEEN and similar functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/694493#M647</link>
      <description>&lt;P&gt;I am trying to &lt;STRONG&gt;understand&lt;/STRONG&gt; what is happening beneath the surface with functions like DATESYTD and DATESBETWEEN.&amp;nbsp; The scenario:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A measure [Total]&lt;/LI&gt;&lt;LI&gt;A calendar table Calendar with columns Date, Year, Month, Day&lt;/LI&gt;&lt;LI&gt;A matrix with rows Year, Month and value [Total]&lt;/LI&gt;&lt;LI&gt;Some YTD measures (below)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Measure 1 - Using TOTALYTD - ok&lt;/P&gt;&lt;P&gt;Measure 2 - Using CALCULATE and DATESYTD&lt;/P&gt;&lt;P&gt;Measure 3 - Using CALCULATE and DATESBETWEEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All three work as expected and produce the expected result.&amp;nbsp; Curiosity has me wondering how the 2nd and 3rd are doing so relative to the &lt;EM&gt;matrix layout&lt;/EM&gt;.&amp;nbsp; In my expressions I do&amp;nbsp;&lt;U&gt;not&lt;/U&gt; refer to of modify (clear) the filters on Year, Month, Day.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given DATESYTD and DATESBETWEEN return a single column table.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I wrote the expression using the custom technique with FILTER then I'd need to &lt;STRONG&gt;explicitly&lt;/STRONG&gt; clear the filters on those columns or the entire Calendar table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume DATESYTD and DATESBETWEEN are doing this but is there any &lt;EM&gt;documented details&lt;/EM&gt; on &lt;STRONG&gt;how&lt;/STRONG&gt; these functions work?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Measure 2 = CALCULATE ( [Total, DATESYTD ( 'Calendar'[Date] ) )
Measure 3 = CALCULATE ( [Total], DATESBETWEEN ( 'Calendar'[Date], STARTOFYEAR ( 'Calendar'[Date] ), LASTDATE ( 'Calendar'[Date] ) ) )&lt;/PRE&gt;&lt;P&gt;Note, am not concerned about the theory of other functions (unless they relate to this topic), am well aware of when and how simple functions like MAX/MIN should be used.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 03:32:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/694493#M647</guid>
      <dc:creator>Cymbolz</dc:creator>
      <dc:date>2019-05-20T03:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding DATESYTD, DATESBETWEEN and similar functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/716068#M1230</link>
      <description>&lt;P&gt;Giving this a slight bump.&amp;nbsp; Anyone?&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jun 2019 23:14:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/716068#M1230</guid>
      <dc:creator>Cymbolz</dc:creator>
      <dc:date>2019-06-16T23:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding DATESYTD, DATESBETWEEN and similar functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/718357#M1291</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="41" data-lia-user-login="marcorusso" class="lia-mention lia-mention-user"&gt;marcorusso&lt;/a&gt;&amp;nbsp;time for the super heros of DAX to have an input? :)&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 03:09:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/718357#M1291</guid>
      <dc:creator>Cymbolz</dc:creator>
      <dc:date>2019-06-19T03:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding DATESYTD, DATESBETWEEN and similar functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/718422#M1292</link>
      <description>&lt;P&gt;The reason is explained in this article:&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/" target="_blank"&gt;https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 05:59:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/718422#M1292</guid>
      <dc:creator>marcorusso</dc:creator>
      <dc:date>2019-06-19T05:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding DATESYTD, DATESBETWEEN and similar functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/718456#M1293</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="41" data-lia-user-login="marcorusso" class="lia-mention lia-mention-user"&gt;marcorusso&lt;/a&gt;,&amp;nbsp;hit the nail on the head (again!).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mid-way through the article I was saying to myself "but it works irrespective of Mark as Date table" as that was part of my testing.&amp;nbsp; Only a couple of paragraphs later did I read about when the Date column is the key in the relationship.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My life feels much more complete now&amp;nbsp;:smileyvery-happy:&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 06:33:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DATESYTD-DATESBETWEEN-and-similar-functions/m-p/718456#M1293</guid>
      <dc:creator>Cymbolz</dc:creator>
      <dc:date>2019-06-19T06:33:23Z</dc:date>
    </item>
  </channel>
</rss>

