<?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: DAX command to get total sales for YTD in Direct mode in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209344#M117002</link>
    <description>&lt;P&gt;There needs to be some element from the date table in the visual. If there isn't, try adding a filter so that the date is in this day.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Apr 2023 12:52:49 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2023-04-27T12:52:49Z</dc:date>
    <item>
      <title>DAX command to get total sales for YTD in Direct mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3208990#M116974</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with SalesAmount and SalesDate and want to be able to see the YTD total.&amp;nbsp; Our year runs from 1st May-30April.&lt;/P&gt;&lt;P&gt;This is the code I have but I keep getting syntax incorrect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;YTD Billing = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;vw_PBI_Dashboard_Bills&lt;/SPAN&gt;&lt;SPAN&gt;[BilledAmount]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&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023 10:05:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3208990#M116974</guid>
      <dc:creator>atresadern</dc:creator>
      <dc:date>2023-04-27T10:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to get total sales for YTD in Direct mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209121#M116983</link>
      <description>&lt;P&gt;For the time intelligence functions to work correctly you need a proper date table, marked as a date table. Link the 'Date'[Date] column to your&amp;nbsp;&lt;SPAN&gt;vw_PBI_Dashboard_Bills&lt;/SPAN&gt;&lt;SPAN&gt;[CreatedDate] column and then the measure becomes simply&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;YTD Billing =
CALCULATE (
    SUM ( vw_PBI_Dashboard_Bills[BilledAmount] ),
    DATESYTD ( 'Date'[Date], "4/30" )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Apr 2023 11:14:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209121#M116983</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-04-27T11:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to get total sales for YTD in Direct mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209133#M116985</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems to work, rather than linking the date table, any reason why I shouldn't do it this way?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;YTD Billing = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt; ( vw_PBI_Dashboard_Bills[BilledAmount] ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;DATESYTD&lt;/SPAN&gt;&lt;SPAN&gt; ('vw_PBI_Dashboard_Bills'[CreatedDate], &lt;/SPAN&gt;&lt;SPAN&gt;"4/30"&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Apr 2023 11:23:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209133#M116985</guid>
      <dc:creator>atresadern</dc:creator>
      <dc:date>2023-04-27T11:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to get total sales for YTD in Direct mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209143#M116986</link>
      <description>&lt;P&gt;That might work but it is considered best practice to have a proper date table. As well as guaranteeing that the time intelligence functions work as expected you can break the data down by month, week etc and you can add other useful columns such as is the day a working day or not. There's lots of articles and videos on creating a date table.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 11:28:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209143#M116986</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-04-27T11:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to get total sales for YTD in Direct mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209170#M116990</link>
      <description>&lt;P&gt;I have a date table created from an article but it's not working when I use&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATESYTD ( 'Date'[Date], "4/30" )&lt;/PRE&gt;&lt;P&gt;rather than the Created date.&amp;nbsp; I've linked the table and tried linking both ways but got blank results - any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 11:48:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209170#M116990</guid>
      <dc:creator>atresadern</dc:creator>
      <dc:date>2023-04-27T11:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to get total sales for YTD in Direct mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209344#M117002</link>
      <description>&lt;P&gt;There needs to be some element from the date table in the visual. If there isn't, try adding a filter so that the date is in this day.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 12:52:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209344#M117002</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-04-27T12:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to get total sales for YTD in Direct mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209409#M117011</link>
      <description>&lt;P&gt;Thanks for your response, I appreciate your input.&amp;nbsp; I can get it working with a different calendar table which is limited to just the dates in our year but not the full date table which has 20 years of dates (I could probably reduce this).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 13:27:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-get-total-sales-for-YTD-in-Direct-mode/m-p/3209409#M117011</guid>
      <dc:creator>atresadern</dc:creator>
      <dc:date>2023-04-27T13:27:01Z</dc:date>
    </item>
  </channel>
</rss>

