<?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 Show only values that occur after the first positive value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959505#M11164</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling to find a solution to my problem and have searched the forum for hours trying to peice together a solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a hypothetical table with 3 columns: Date, BusinessID, Sales. Using DAX, I want only show values from the Sales column that occur after each business' first initial positive Sale value. The first positive Sale acts as a trigger for us to start tracking further data, so I want to ignore all negative Sales values until a positive one occurs, then show all. In the below screenshot, the orange column has the desired behavior.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to do this in DAX, because the Sales column is a measure that relies on a date from another table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 05 Mar 2020 00:23:45 GMT</pubDate>
    <dc:creator>relliott</dc:creator>
    <dc:date>2020-03-05T00:23:45Z</dc:date>
    <item>
      <title>Show only values that occur after the first positive value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959505#M11164</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling to find a solution to my problem and have searched the forum for hours trying to peice together a solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a hypothetical table with 3 columns: Date, BusinessID, Sales. Using DAX, I want only show values from the Sales column that occur after each business' first initial positive Sale value. The first positive Sale acts as a trigger for us to start tracking further data, so I want to ignore all negative Sales values until a positive one occurs, then show all. In the below screenshot, the orange column has the desired behavior.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to do this in DAX, because the Sales column is a measure that relies on a date from another table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Mar 2020 00:23:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959505#M11164</guid>
      <dc:creator>relliott</dc:creator>
      <dc:date>2020-03-05T00:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Show only values that occur after the first positive value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959541#M11165</link>
      <description>&lt;P&gt;This is a column since I don't have your data or measure.&amp;nbsp; No guarantees but you get the idea.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TxnsFromPos = VAR _col = CALCULATE(MIN(TableSale[Date]), TableSale[Sales] &amp;gt; 0 ,ALLEXCEPT(TableSale, TableSale[businessiD]))
RETURN  
   if (_col &amp;lt;= TableSale[Date], TableSale[Sales], BLANK())&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could I ask that in future you post your data (not a picture) and any relevant measure code (or pbix).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 01:24:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959541#M11165</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2020-03-05T01:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Show only values that occur after the first positive value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959723#M11168</link>
      <description>&lt;P&gt;I am thinking something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
  VAR __BusinessID = [BusinessID]
  VAR __Date = [Date]
  VAR __Table = FILTER('Table',[BusinessID] = __BusinessID &amp;amp;&amp;amp; [Date] &amp;lt;= __Date)
  VAR __FirstPositive = MINX(FILTER(__Table,[Sales] &amp;gt; 0),[Date])
RETURN
  IF(__Date &amp;gt;= __FirstPositive,[Sales],BLANK())&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 04:12:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959723#M11168</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-03-05T04:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Show only values that occur after the first positive value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959776#M11175</link>
      <description>&lt;P&gt;This worked great! Thanks, Greg! I may have been overthinking it...&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 05:16:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959776#M11175</guid>
      <dc:creator>relliott</dc:creator>
      <dc:date>2020-03-05T05:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Show only values that occur after the first positive value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959778#M11176</link>
      <description>&lt;P&gt;Thanks! I will share the pbix in the future. good advice!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 05:18:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-only-values-that-occur-after-the-first-positive-value/m-p/959778#M11176</guid>
      <dc:creator>relliott</dc:creator>
      <dc:date>2020-03-05T05:18:23Z</dc:date>
    </item>
  </channel>
</rss>

