<?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: What is the difference between these two uses of DATESYTD? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/What-is-the-difference-between-these-two-uses-of-DATESYTD/m-p/1099727#M16123</link>
    <description>&lt;P&gt;I'll take a shot at it.&amp;nbsp; While Calculate() and Calculatetable() accept tables as filter arguments, Filter() is an iterator and is looking for an evaluation to do on each row.&amp;nbsp; The measure you've written provides a table there instead.&amp;nbsp; If you replace Filter() with Calculatetable(), it would work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works for you, please mark it as solution.&amp;nbsp; Kudos are appreciated too.&amp;nbsp; Please let me know if not.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;</description>
    <pubDate>Thu, 21 May 2020 02:08:28 GMT</pubDate>
    <dc:creator>mahoneypat</dc:creator>
    <dc:date>2020-05-21T02:08:28Z</dc:date>
    <item>
      <title>What is the difference between these two uses of DATESYTD?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/What-is-the-difference-between-these-two-uses-of-DATESYTD/m-p/1099571#M16120</link>
      <description>&lt;P&gt;Hi there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to understand the difference between using:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Entradas YTD = 
CALCULATE(
    [Entradas Totais];
    DATESYTD( 'dCalendário'[Data] )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... and using:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Entradas YTD v2 = 
CALCULATE(
    [Entradas Totais];
    FILTER(
        'dCalendário';
        DATESYTD( 'dCalendário'[Data] )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first option works, but the second one rises an error saying that multiple values has been supplied. From my understanding &lt;EM&gt;&lt;STRONG&gt;DATESYTD returns me a single colun table with dates from the first date of the year of the current context and the last date of the current context, and it will filter table &lt;EM&gt;&lt;STRONG&gt;dCalendário, and this filtered &lt;STRONG&gt;&lt;EM&gt;dCalendário will filter my measure &lt;EM&gt;&lt;STRONG&gt;[Entradas Totais].&lt;/STRONG&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;EM&gt;&lt;STRONG&gt;Can someone explain to me what concept I am missing?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;EM&gt;&lt;STRONG&gt;Thanks in advance.&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 21:48:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/What-is-the-difference-between-these-two-uses-of-DATESYTD/m-p/1099571#M16120</guid>
      <dc:creator>LucasRezende</dc:creator>
      <dc:date>2020-05-20T21:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between these two uses of DATESYTD?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/What-is-the-difference-between-these-two-uses-of-DATESYTD/m-p/1099727#M16123</link>
      <description>&lt;P&gt;I'll take a shot at it.&amp;nbsp; While Calculate() and Calculatetable() accept tables as filter arguments, Filter() is an iterator and is looking for an evaluation to do on each row.&amp;nbsp; The measure you've written provides a table there instead.&amp;nbsp; If you replace Filter() with Calculatetable(), it would work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works for you, please mark it as solution.&amp;nbsp; Kudos are appreciated too.&amp;nbsp; Please let me know if not.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 02:08:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/What-is-the-difference-between-these-two-uses-of-DATESYTD/m-p/1099727#M16123</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-05-21T02:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between these two uses of DATESYTD?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/What-is-the-difference-between-these-two-uses-of-DATESYTD/m-p/1105497#M16214</link>
      <description>Well, you're missing the concept of logical conditions. Filters in CALCULATE/CALCULATETABLE are tables and logical conditions in FILTER. A table is not a logical condition.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Fri, 22 May 2020 14:59:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/What-is-the-difference-between-these-two-uses-of-DATESYTD/m-p/1105497#M16214</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-22T14:59:49Z</dc:date>
    </item>
  </channel>
</rss>

