<?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 Sales Past  Years to Date in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Sales-Past-Years-to-Date/m-p/1101103#M23797</link>
    <description>&lt;P&gt;Hello, I'm trying to set up a measure to show me the previous years sales to date.&lt;/P&gt;&lt;P&gt;tblSales: [Inv Date], [Inv Amount]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Year&amp;nbsp; &amp;nbsp; &amp;nbsp;YTD Sales Amount&lt;/P&gt;&lt;P&gt;2016&amp;nbsp; &amp;nbsp; 4,000&lt;/P&gt;&lt;P&gt;2017&amp;nbsp; &amp;nbsp; 4,500&lt;/P&gt;&lt;P&gt;2018&amp;nbsp; &amp;nbsp; 4,800&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2019&amp;nbsp; &amp;nbsp; 4,700&amp;nbsp; &amp;nbsp; -&amp;gt;&amp;nbsp; 2016-2019 showing the entire year, but I want it to show up to today's date for each respective year&lt;/P&gt;&lt;P&gt;2020&amp;nbsp; &amp;nbsp; 2,300&amp;nbsp; &amp;nbsp; -&amp;gt;&amp;nbsp; &amp;nbsp;this is showing the data YTD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 May 2020 14:54:44 GMT</pubDate>
    <dc:creator>GuiBrum</dc:creator>
    <dc:date>2020-05-21T14:54:44Z</dc:date>
    <item>
      <title>Sales Past  Years to Date</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sales-Past-Years-to-Date/m-p/1101103#M23797</link>
      <description>&lt;P&gt;Hello, I'm trying to set up a measure to show me the previous years sales to date.&lt;/P&gt;&lt;P&gt;tblSales: [Inv Date], [Inv Amount]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Year&amp;nbsp; &amp;nbsp; &amp;nbsp;YTD Sales Amount&lt;/P&gt;&lt;P&gt;2016&amp;nbsp; &amp;nbsp; 4,000&lt;/P&gt;&lt;P&gt;2017&amp;nbsp; &amp;nbsp; 4,500&lt;/P&gt;&lt;P&gt;2018&amp;nbsp; &amp;nbsp; 4,800&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2019&amp;nbsp; &amp;nbsp; 4,700&amp;nbsp; &amp;nbsp; -&amp;gt;&amp;nbsp; 2016-2019 showing the entire year, but I want it to show up to today's date for each respective year&lt;/P&gt;&lt;P&gt;2020&amp;nbsp; &amp;nbsp; 2,300&amp;nbsp; &amp;nbsp; -&amp;gt;&amp;nbsp; &amp;nbsp;this is showing the data YTD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 14:54:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sales-Past-Years-to-Date/m-p/1101103#M23797</guid>
      <dc:creator>GuiBrum</dc:creator>
      <dc:date>2020-05-21T14:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Past  Years to Date</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sales-Past-Years-to-Date/m-p/1102635#M23808</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="232723" data-lia-user-login="GuiBrum" class="lia-mention lia-mention-user"&gt;GuiBrum&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Basically you need to calculate running total by Year, and filter Month and Day up to "Today()'s month and day". If that's the case, try the following measure:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = Calculate( sum([Inv Amount]),FILTER(ALL(tblSales),[Inv Date]&amp;lt;=MAX([Inv Date])),
FILTER(ALL(tblSales),
SUMX(FILTER(tblSales,
    EARLIER(tblSales[Inv Date].[Year])=[Inv Date].[Year]
&amp;amp;&amp;amp;  EARLIER(tblSales[Inv Date].[MonthNo])&amp;lt;=MONTH(TODAY())
&amp;amp;&amp;amp;  EARLIER(tblSales[Inv Date].[Day])&amp;lt;=DAY(TODAY())),1)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Paul Zheng _ Community Support Team&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 07:55:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sales-Past-Years-to-Date/m-p/1102635#M23808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-22T07:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Past  Years to Date</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sales-Past-Years-to-Date/m-p/1106787#M23820</link>
      <description>&lt;P&gt;Thank you. I use a Date table so I incorportated it to the code, but the totals do not match.&lt;/P&gt;&lt;P&gt;Now all dates are showing comparable numbers which means that the filter is working, I dont know if the parameters are right though because the 2020 YTD is not matching the actual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales YTD = Calculate( sum(tblSales[Inv Amount]),FILTER(ALL(tblSales),tblSales[Inv Date]&amp;lt;=MAX(tblSales[Inv Date])),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER(ALL(Dates),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX(FILTER(Dates,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;EARLIER(Dates[Date].[Year])=Dates[Date].[Year]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;amp;&amp;amp; EARLIER(Dates[Date].[MonthNo])&amp;lt;=MONTH(TODAY())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;amp;&amp;amp; EARLIER(Dates[Date].[Day])&amp;lt;=DAY(TODAY())),1)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;My last record is 05/20/2020 if this means anything.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thanks you for any further comments to help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 22 May 2020 19:09:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sales-Past-Years-to-Date/m-p/1106787#M23820</guid>
      <dc:creator>GuiBrum</dc:creator>
      <dc:date>2020-05-22T19:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Past  Years to Date</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sales-Past-Years-to-Date/m-p/1118890#M23863</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="232723" data-lia-user-login="GuiBrum" class="lia-mention lia-mention-user"&gt;GuiBrum&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you related the two table with columns Date[Date] and tblSales[Inv Date]? I guess you can filter with the [Inv Date] in the sales table instead of change the code to Date[Date], try stick it with the first filter. And you may replace Today() with 2020.05.20 to test.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = Calculate( sum([Inv Amount]),FILTER(ALL(tblSales),[Inv Date]&amp;lt;=MAX([Inv Date])),
FILTER(ALL(tblSales),
SUMX(FILTER(tblSales,
    EARLIER(tblSales[Inv Date].[Year])=[Inv Date].[Year]
&amp;amp;&amp;amp;  EARLIER(tblSales[Inv Date].[MonthNo])&amp;lt;=MONTH(DATE(2020,5,20))
&amp;amp;&amp;amp;  EARLIER(tblSales[Inv Date].[Day])&amp;lt;=DAY(DATE(2020,5,20))),1)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you provide a sample pbix if it still goes wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Paul Zheng _ Community Support Team&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;BR /&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 06:54:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sales-Past-Years-to-Date/m-p/1118890#M23863</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-26T06:54:19Z</dc:date>
    </item>
  </channel>
</rss>

