<?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: TOTALYTD or CALCULATE in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2108595#M48216</link>
    <description>&lt;P&gt;Hi VahidDM,&lt;/P&gt;&lt;P&gt;I realized that you have to use the same table (&lt;SPAN&gt;&lt;U&gt;&lt;STRONG&gt;TableSales'[Value]&lt;/STRONG&gt;&lt;/U&gt;),SAMEPERIODLASTYEAR('&lt;U&gt;&lt;STRONG&gt;TableSales'[Date])&lt;/STRONG&gt;&lt;/U&gt;&lt;/SPAN&gt;and not the calendar table, but this time the visual is empty. I don't understand why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Sep 2021 15:56:05 GMT</pubDate>
    <dc:creator>Tidous972</dc:creator>
    <dc:date>2021-09-30T15:56:05Z</dc:date>
    <item>
      <title>TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2103757#M48016</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="Y2IQFc"&gt;I have a Sales table ranging from 01/01/2019 to 08/31/2021 and I would like to compare the total sales but of course from January to August for each year. Can I use TOTALYTD.&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;Regards&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 19:13:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2103757#M48016</guid>
      <dc:creator>Tidous972</dc:creator>
      <dc:date>2021-09-28T19:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2103985#M48028</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312359" data-lia-user-login="Tidous972" class="lia-mention lia-mention-user"&gt;Tidous972&lt;/a&gt;&amp;nbsp;Hi Tidous972,&lt;/P&gt;&lt;P&gt;It depends on your data because there are many ways of getting YTD sales based on data. please share sample data if possible.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 22:10:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2103985#M48028</guid>
      <dc:creator>colacan</dc:creator>
      <dc:date>2021-09-28T22:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2104036#M48031</link>
      <description>&lt;LI-SPOILER&gt;&lt;LI-SPOILER&gt;&amp;nbsp;&lt;/LI-SPOILER&gt; &lt;/LI-SPOILER&gt;&lt;P&gt;Hi Colacan,&lt;/P&gt;&lt;P&gt;Thank you for your answer. I dont know how to share the .pbix file.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 22:53:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2104036#M48031</guid>
      <dc:creator>Tidous972</dc:creator>
      <dc:date>2021-09-28T22:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2104047#M48032</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 23:01:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2104047#M48032</guid>
      <dc:creator>Tidous972</dc:creator>
      <dc:date>2021-09-28T23:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2104180#M48036</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312359" data-lia-user-login="Tidous972" class="lia-mention lia-mention-user"&gt;Tidous972&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try these measures:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this year:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TotalYTD = TOTALYTD(sum('Table'[Value]),'Table'[Date])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;For last Year:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TotalLYTD = TOTALYTD(sum('Table'[Value]),SAMEPERIODLASTYEAR('Table'[Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For Year 2019 :&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total2LYTD = TOTALYTD(sum('Table'[Value]),DATEADD('Table'[Date], -2, year))&lt;/SPAN&gt;&lt;/DIV&gt;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gt;31-Mar-21&lt;/TD&gt;&lt;TD&gt;2700&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;30-Apr-21&lt;/TD&gt;&lt;TD&gt;2800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;31-May-21&lt;/TD&gt;&lt;TD&gt;2900&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;30-Jun-21&lt;/TD&gt;&lt;TD&gt;3000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;31-Jul-21&lt;/TD&gt;&lt;TD&gt;3100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;31-Aug-21&lt;/TD&gt;&lt;TD&gt;3200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;output:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, please consider&amp;nbsp;&lt;STRONG&gt;accepting&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;it as the solution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Appreciate your Kudos!!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Sep 2021 01:07:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2104180#M48036</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-09-29T01:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2106364#M48127</link>
      <description>&lt;P&gt;Hi VahidDM&lt;/P&gt;&lt;P&gt;It's Ok for the current year (01/31/21 to 08/31/21) but it's wrong for the previous years, the formulas don't work. For the last year and for 2019, i have the total of sales of the year and not the total of the same period of 2021 i.e January to August. (01/31/20 to 08/31/20 and 01/21/19 to 08/31/19).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 17:39:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2106364#M48127</guid>
      <dc:creator>Tidous972</dc:creator>
      <dc:date>2021-09-29T17:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2106709#M48138</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312359" data-lia-user-login="Tidous972" class="lia-mention lia-mention-user"&gt;Tidous972&lt;/a&gt;&amp;nbsp;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you want to include value of January in the calculation? IF yes, based on my sample data those values from Measures are correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Appreciate your Kudos!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 23:18:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2106709#M48138</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-09-29T23:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2106721#M48139</link>
      <description>&lt;P&gt;HI VadidDM,&lt;/P&gt;&lt;P&gt;Yes of course, I &lt;SPAN&gt;want to include the values of January.&amp;nbsp;&lt;/SPAN&gt;I have copied your formula exactly but it returns me the total sales for the year and not the partial sales from January to August for 2019 and 2020.Thank you for taking the time to help me.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 23:51:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2106721#M48139</guid>
      <dc:creator>Tidous972</dc:creator>
      <dc:date>2021-09-29T23:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2106815#M48141</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312359" data-lia-user-login="Tidous972" class="lia-mention lia-mention-user"&gt;Tidous972&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share a sample of your data in a table format (to be able to copy and past that)?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 01:13:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2106815#M48141</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-09-30T01:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2108595#M48216</link>
      <description>&lt;P&gt;Hi VahidDM,&lt;/P&gt;&lt;P&gt;I realized that you have to use the same table (&lt;SPAN&gt;&lt;U&gt;&lt;STRONG&gt;TableSales'[Value]&lt;/STRONG&gt;&lt;/U&gt;),SAMEPERIODLASTYEAR('&lt;U&gt;&lt;STRONG&gt;TableSales'[Date])&lt;/STRONG&gt;&lt;/U&gt;&lt;/SPAN&gt;and not the calendar table, but this time the visual is empty. I don't understand why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 15:56:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2108595#M48216</guid>
      <dc:creator>Tidous972</dc:creator>
      <dc:date>2021-09-30T15:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: TOTALYTD or CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2108827#M48228</link>
      <description>&lt;P&gt;I VahidDM,&lt;/P&gt;&lt;P&gt;To follow up on my previous post, I found the origin of the error and is due to the relationship with the Date table of my model. When I delete the relation between Date table and the tables of Sales, the TotalYTD and Total2YTD formulas works, otherwise the visuals concerning the previous years are empty when the relationship is on. Do you have an idea.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 18:02:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOTALYTD-or-CALCULATE/m-p/2108827#M48228</guid>
      <dc:creator>Tidous972</dc:creator>
      <dc:date>2021-09-30T18:02:18Z</dc:date>
    </item>
  </channel>
</rss>

