<?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 Using EARLIER function to return an earlier non-zero value based on column criteria in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-EARLIER-function-to-return-an-earlier-non-zero-value-based/m-p/1934250#M42052</link>
    <description>&lt;P&gt;Hi, I am trying to write some DAX that looks for an earlier non-zero value of a column based on multiple column criteria.&lt;/P&gt;&lt;P&gt;e.g. for row 3 below it would return the most 'recent' non-zero value where both SKU and Country match i.e. 15.40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've had some joy using the below but it's not really working as I want it to:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Test = CALCULATE(MAX('Price Lookup'[Current Price (€)]),FILTER('Price Lookup','Price Lookup'[Config-SKU]=EARLIER('Price Lookup'[Config-SKU]) &amp;amp;&amp;amp; 'Price Lookup'[Country]=EARLIER('Price Lookup'[Country])))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jul 2021 03:42:04 GMT</pubDate>
    <dc:creator>AdamRobC</dc:creator>
    <dc:date>2021-07-02T03:42:04Z</dc:date>
    <item>
      <title>Using EARLIER function to return an earlier non-zero value based on column criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-EARLIER-function-to-return-an-earlier-non-zero-value-based/m-p/1934250#M42052</link>
      <description>&lt;P&gt;Hi, I am trying to write some DAX that looks for an earlier non-zero value of a column based on multiple column criteria.&lt;/P&gt;&lt;P&gt;e.g. for row 3 below it would return the most 'recent' non-zero value where both SKU and Country match i.e. 15.40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've had some joy using the below but it's not really working as I want it to:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Test = CALCULATE(MAX('Price Lookup'[Current Price (€)]),FILTER('Price Lookup','Price Lookup'[Config-SKU]=EARLIER('Price Lookup'[Config-SKU]) &amp;amp;&amp;amp; 'Price Lookup'[Country]=EARLIER('Price Lookup'[Country])))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 03:42:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-EARLIER-function-to-return-an-earlier-non-zero-value-based/m-p/1934250#M42052</guid>
      <dc:creator>AdamRobC</dc:creator>
      <dc:date>2021-07-02T03:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using EARLIER function to return an earlier non-zero value based on column criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-EARLIER-function-to-return-an-earlier-non-zero-value-based/m-p/1934691#M42058</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="147069" data-lia-user-login="AdamRobC" class="lia-mention lia-mention-user"&gt;AdamRobC&lt;/a&gt; , this one seems correct. check do you have any other row, which is causing that or you need any additional filter &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can try this too&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Test = MAXX(FILTER('Price Lookup','Price Lookup'[Config-SKU]=EARLIER('Price Lookup'[Config-SKU]) &amp;amp;&amp;amp; 'Price Lookup'[Country]=EARLIER('Price Lookup'[Country])),'Price Lookup'[Current Price (€)])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 07:51:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-EARLIER-function-to-return-an-earlier-non-zero-value-based/m-p/1934691#M42058</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-07-02T07:51:57Z</dc:date>
    </item>
  </channel>
</rss>

