<?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 value of lost contractors in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-value-of-lost-contractors/m-p/3491058#M133669</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I need a measure that will sum up the sales value of contractors for 12 months who have not made purchases in the last 12 months. This value is supposed to be the sum of purchases from the 13th to the 24th month back. The measure of sales is SprWdPH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank for help&lt;/P&gt;</description>
    <pubDate>Mon, 23 Oct 2023 10:10:44 GMT</pubDate>
    <dc:creator>ArielCz91</dc:creator>
    <dc:date>2023-10-23T10:10:44Z</dc:date>
    <item>
      <title>Sales value of lost contractors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-value-of-lost-contractors/m-p/3491058#M133669</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I need a measure that will sum up the sales value of contractors for 12 months who have not made purchases in the last 12 months. This value is supposed to be the sum of purchases from the 13th to the 24th month back. The measure of sales is SprWdPH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank for help&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 10:10:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-value-of-lost-contractors/m-p/3491058#M133669</guid>
      <dc:creator>ArielCz91</dc:creator>
      <dc:date>2023-10-23T10:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sales value of lost contractors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-value-of-lost-contractors/m-p/3491484#M133682</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="518168" data-lia-user-login="ArielCz91" class="lia-mention lia-mention-user"&gt;ArielCz91&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to add some sample data and you will get a solution quicker.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 13:33:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-value-of-lost-contractors/m-p/3491484#M133682</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-10-23T13:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sales value of lost contractors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-value-of-lost-contractors/m-p/3506530#M134521</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="518168" data-lia-user-login="ArielCz91" class="lia-mention lia-mention-user"&gt;ArielCz91&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;Sorry, not quite sure what you mean, do you want to add up the amounts for the next 12 months for those who have not made purchases in the last 12 months?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
var _today=TODAY()
var _last12=DATE(YEAR(_today)-1,MONTH(_today),DAY(_today))
var _Next12=DATE(YEAR(_today)+1,MONTH(_today),DAY(_today))
var _column=SELECTCOLUMNS(FILTER(ALL('Table'),'Table'[contractors]=MAX('Table'[contractors])&amp;amp;&amp;amp;'Table'[Date]&amp;gt;=_last12&amp;amp;&amp;amp;'Table'[Date]&amp;lt;=_today),"pur",[purchases])
return
IF(
    "No" in _column&amp;amp;&amp;amp;MAX('Table'[Date])&amp;gt;_today&amp;amp;&amp;amp;MAX('Table'[Date])&amp;lt;=_Next12,1,0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure =
SUMX(
    ALLSELECTED('Table'),[SprWdPH])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;Place [Flag]in Filters, set is=1, apply filter.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If it doesn't meet your desired outcome, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 07:54:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-value-of-lost-contractors/m-p/3506530#M134521</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-31T07:54:30Z</dc:date>
    </item>
  </channel>
</rss>

