<?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: DATESYTD not working ? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2224249#M52912</link>
    <description>&lt;P&gt;Hi both,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, I thought it does not need context for this particular function, but it does. Initially I do not intent to have any slicer for this time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;, this is so cool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 07 Dec 2021 03:19:32 GMT</pubDate>
    <dc:creator>admin_xlsior</dc:creator>
    <dc:date>2021-12-07T03:19:32Z</dc:date>
    <item>
      <title>DATESYTD not working ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2223548#M52861</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can DATESYTD working without any context ?&lt;/P&gt;&lt;P&gt;I have this data like :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Is having this kind of measure :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;All net sales YTD = CALCULATE(
                        [All net sales],
                        DATESYTD(Dates[Date])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;works ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If based on my table, shouldn't I receive a total of net sales for year of 2021 ? April - Sept 2021 ? Because currently it is blank.&lt;/P&gt;&lt;P&gt;If I click on the row of that table, for example April 1 2021, then the measure is correct, returned the exact value (87,800), but when none selected which is what I want because I only need the total of sales "up-to-this-year" which mean I do not need that table, then it returned blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 18:26:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2223548#M52861</guid>
      <dc:creator>admin_xlsior</dc:creator>
      <dc:date>2021-12-06T18:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: DATESYTD not working ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2223715#M52866</link>
      <description>&lt;P&gt;HI &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="113010" data-lia-user-login="admin_xlsior" class="lia-mention lia-mention-user"&gt;admin_xlsior&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For DatesYTD you need date filter context.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;without fitler context&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with filter context&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;other filter context (here 2020 is ignored since I also chose something from 2021)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post helps, then please&amp;nbsp;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&amp;nbsp;to help other community members find it more quickly&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Click on the Thumbs-Up icon if you like this reply.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 20:10:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2223715#M52866</guid>
      <dc:creator>Mikelytics</dc:creator>
      <dc:date>2021-12-06T20:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: DATESYTD not working ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2223779#M52872</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;If I understood your problem correctly you would like to have YTD measure in a KPI card or something similar to that? Based on the problem description I think your slicer selection is not working as you would hope and thus you get the blank value.&amp;nbsp; Instead of Datesytd you could use the following approach:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;My test data:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ideal outcome:&lt;BR /&gt;&lt;/STRONG&gt;So in this example the goal is that without any slicers the YTD measure would return 350. That is this year's running total until today. If something is selected the calculation should be done until the selected day. So for example If I select 4.12.2021 the calculation would be from this time period: 1.1.2021-4.12.2021.&lt;BR /&gt;&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ates until today):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;With date selected (calculates until selection:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Hopefully this can be used to resolve your issue and if it does accept this as a solution!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 20:37:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2223779#M52872</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2021-12-06T20:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: DATESYTD not working ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2223848#M52883</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="113010" data-lia-user-login="admin_xlsior" class="lia-mention lia-mention-user"&gt;admin_xlsior&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to add a Calendar [Date] table to your model to use time intelligence&amp;nbsp;DAX functions.&lt;/P&gt;&lt;P&gt;Use this link to add that calendar:&amp;nbsp;&lt;A href="https://www.vahiddm.com/post/creating-calendar-table-with-3-steps" target="_blank"&gt;https://www.vahiddm.com/post/creating-calendar-table-with-3-steps&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 21:26:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2223848#M52883</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-12-06T21:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: DATESYTD not working ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2224249#M52912</link>
      <description>&lt;P&gt;Hi both,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, I thought it does not need context for this particular function, but it does. Initially I do not intent to have any slicer for this time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;, this is so cool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 03:19:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATESYTD-not-working/m-p/2224249#M52912</guid>
      <dc:creator>admin_xlsior</dc:creator>
      <dc:date>2021-12-07T03:19:32Z</dc:date>
    </item>
  </channel>
</rss>

