<?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: 12 Month Sales in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/12-Month-Sales/m-p/408341#M12170</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies for the delay in responding. Filter was the solution, just wasnt sure how to use it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was my solution for the sales over 12 months, I had&amp;nbsp;a slicer to select the end period&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var curDateStr = CALCULATE ( MIN ( Dates2[FilterDate] ), ALLEXCEPT ( Dates2, Dates2[FilterDate] ) )&lt;BR /&gt;var curDate = DATE(LEFT(curDateStr,4),VALUE(MID(curDateStr,6,2)),RIGHT(curDateStr,1))&lt;BR /&gt;VAR DateAddAlternative = EDATE(curDate,-MonthsToLookBack)&lt;BR /&gt;return&lt;BR /&gt;CALCULATE ( SUM ( 'EOM_STK'[SOH] ), FILTER(EOM_STK,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EOM_STK[perioddate]=curDate&lt;BR /&gt;))&lt;/P&gt;</description>
    <pubDate>Tue, 01 May 2018 23:35:43 GMT</pubDate>
    <dc:creator>jausting</dc:creator>
    <dc:date>2018-05-01T23:35:43Z</dc:date>
    <item>
      <title>12 Month Sales</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/12-Month-Sales/m-p/404593#M12069</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a measure to sum sales over past 12 months, before August 2017&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the measure to calculate the previous 12 month sales from a date that is selected in a slicer (Dates Table0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure = CALCULATE(sum(EOM_STK[Sales]), 'EOM_STK'[perioddate]&amp;lt;=DATE(2017, 08, 1) &amp;amp;&amp;amp; 'EOM_STK'[perioddate]&amp;gt;=DATE(2016, 09, 1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dates table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Year&amp;nbsp; &amp;nbsp;Month&amp;nbsp; FilterDate&lt;/P&gt;&lt;P&gt;2017&amp;nbsp; 01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2017-01-01&lt;/P&gt;&lt;P&gt;2017&amp;nbsp; 02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2017-02-01&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if I substitue the dates for the date slicer, I get the error message that the expression contains multiple columns but only a single column can be used in a true/false expression. What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 22:59:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/12-Month-Sales/m-p/404593#M12069</guid>
      <dc:creator>jausting</dc:creator>
      <dc:date>2018-04-25T22:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: 12 Month Sales</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/12-Month-Sales/m-p/405847#M12100</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/61398"&gt;@jausting&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may add&amp;nbsp;&lt;A title="FILTER Function" href="https://msdn.microsoft.com/en-us/query-bi/dax/filter-function-dax" target="_blank"&gt;FILTER Function&lt;/A&gt;&amp;nbsp;to the formula.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/filter-arguments-in-calculate/" target="_blank"&gt;https://www.sqlbi.com/articles/filter-arguments-in-calculate/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 09:12:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/12-Month-Sales/m-p/405847#M12100</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2018-04-27T09:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: 12 Month Sales</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/12-Month-Sales/m-p/408341#M12170</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies for the delay in responding. Filter was the solution, just wasnt sure how to use it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was my solution for the sales over 12 months, I had&amp;nbsp;a slicer to select the end period&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var curDateStr = CALCULATE ( MIN ( Dates2[FilterDate] ), ALLEXCEPT ( Dates2, Dates2[FilterDate] ) )&lt;BR /&gt;var curDate = DATE(LEFT(curDateStr,4),VALUE(MID(curDateStr,6,2)),RIGHT(curDateStr,1))&lt;BR /&gt;VAR DateAddAlternative = EDATE(curDate,-MonthsToLookBack)&lt;BR /&gt;return&lt;BR /&gt;CALCULATE ( SUM ( 'EOM_STK'[SOH] ), FILTER(EOM_STK,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EOM_STK[perioddate]=curDate&lt;BR /&gt;))&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 23:35:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/12-Month-Sales/m-p/408341#M12170</guid>
      <dc:creator>jausting</dc:creator>
      <dc:date>2018-05-01T23:35:43Z</dc:date>
    </item>
  </channel>
</rss>

