<?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: First occurrence in a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038376#M45731</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="322096" data-lia-user-login="apurva989" class="lia-mention lia-mention-user"&gt;apurva989&lt;/a&gt; , Try a measure like &lt;/P&gt;
&lt;P&gt;minx(filter(values(Table[Index]), [Cumulative Sum] &amp;gt;= [Wafer Sum] * 0.5), [index])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or are you looking for percentile?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/" target="_blank"&gt;https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459" target="_blank"&gt;https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Aug 2021 17:09:54 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2021-08-25T17:09:54Z</dc:date>
    <item>
      <title>First occurrence in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038151#M45726</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I've been scratching my head over this issue and read through multiple forum posts but nothing has helped me so far. Sample data below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have four fields here:&lt;/P&gt;&lt;P&gt;Index - unsummarized column from my source (column)&lt;/P&gt;&lt;P&gt;Wafer Sum = Summarized column&lt;/P&gt;&lt;P&gt;Cumulative Sum = Running total of Wafer Sum per Index column (Quick Measure)&lt;/P&gt;&lt;P&gt;Flag = Toggles between Yes and No based on following condition ( [Cumulative Sum] &amp;gt;= [Wafer Sum] * 0.5) (Measure)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying to accomplish is get the first occurrence when the Flag = "Yes" and return the Index value. In this case, the Index value returned should be 25. However, I cant use most of the functions such as EARLIER, MINX or CALCULATE since they are catered towards columns and not measures.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help on this issue is appreciated. Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 15:35:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038151#M45726</guid>
      <dc:creator>apurva989</dc:creator>
      <dc:date>2021-08-25T15:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: First occurrence in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038376#M45731</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="322096" data-lia-user-login="apurva989" class="lia-mention lia-mention-user"&gt;apurva989&lt;/a&gt; , Try a measure like &lt;/P&gt;
&lt;P&gt;minx(filter(values(Table[Index]), [Cumulative Sum] &amp;gt;= [Wafer Sum] * 0.5), [index])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or are you looking for percentile?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/" target="_blank"&gt;https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459" target="_blank"&gt;https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 17:09:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038376#M45731</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-08-25T17:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: First occurrence in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038388#M45735</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/148838" target="_blank"&gt;@amitchandak&lt;/A&gt;&amp;nbsp;Almost there!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your formula does give me an index value but I'm looking for the first index value where the flag is yes. The value I'm getting right now is Index = 2. Should be 25. No percentile, just a plain lookup against the index column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The flag measure I created is using the following formula:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if ([Cumulative Sum] &amp;gt;= [Wafer Sum], "Yes","No")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks for your help!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Aug 2021 17:22:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038388#M45735</guid>
      <dc:creator>apurva989</dc:creator>
      <dc:date>2021-08-25T17:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: First occurrence in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038407#M45738</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="322096" data-lia-user-login="apurva989" class="lia-mention lia-mention-user"&gt;apurva989&lt;/a&gt; , based on this&amp;nbsp;&amp;nbsp; ( if ([Cumulative Sum] &amp;gt;= [Wafer Sum], "Yes","No") ) ,&amp;nbsp; it should be like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;minx(filter(values(Table[Index]), [Cumulative Sum] &amp;gt;= [Wafer Sum] ), [index])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You yes condition should be in the filter&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 17:35:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038407#M45738</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-08-25T17:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: First occurrence in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038451#M45743</link>
      <description>&lt;P&gt;Thanks! I got the correct answer after I added the underlying filters &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 18:11:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-occurrence-in-a-measure/m-p/2038451#M45743</guid>
      <dc:creator>apurva989</dc:creator>
      <dc:date>2021-08-25T18:11:47Z</dc:date>
    </item>
  </channel>
</rss>

