<?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: How to filter a table based on a column's highest value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777879#M4022</link>
    <description>&lt;P&gt;OK. So you need another table (created in PQ) that for each quality will store the quantities for the latest and oldest period.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll post a link to a file shortly.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;Dare&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2019 11:56:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-28T11:56:37Z</dc:date>
    <item>
      <title>How to filter a table based on a column's highest value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/775878#M3934</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate the total quantity by Quality from a table called "Data", but filtering on the highest value in Period (in this case, 201906).&amp;nbsp; The purpose is to calculate the variance for each quality (highest period/lowest period).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, I would like to get for each product Quantity [Period 201906] / Quantity [Period 201902]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Source file" href="https://uptobox.com/g8f2evoib7nn" target="_self"&gt;Source file&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried different formulas but I'm struggling with the filter context.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 15:38:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/775878#M3934</guid>
      <dc:creator>jopezzo</dc:creator>
      <dc:date>2019-08-26T15:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a table based on a column's highest value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/775888#M3936</link>
      <description>&lt;P&gt;Create a DAX formula that goes something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Measure IsHighest = 
  VAR __table = SUMMARIZE(ALLSELECTED('Table'),[Quality], [Period],"__Quantity",SUM([Quantity]))
  VAR __max = MAXX(__table,[__Quantity])
  VAR __period = MAXX(FILTER(__table,[__Quantity] = __max),[Period])
RETURN
  IF(MAX([Period]) = __period,1,0)&lt;/PRE&gt;
&lt;P&gt;Then just fiilter on this being 1&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 16:01:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/775888#M3936</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2019-08-26T16:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a table based on a column's highest value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/775940#M3942</link>
      <description>Again, please resist the temptation to do it in DAX. Use Power Query because this is the right tool for the job.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D.</description>
      <pubDate>Mon, 26 Aug 2019 16:48:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/775940#M3942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-26T16:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a table based on a column's highest value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/776077#M3957</link>
      <description>&lt;P&gt;How would you proceed, then, with Query M?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 20:30:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/776077#M3957</guid>
      <dc:creator>jopezzo</dc:creator>
      <dc:date>2019-08-26T20:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a table based on a column's highest value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777672#M4008</link>
      <description>&lt;P&gt;&lt;A href="https://1drv.ms/u/s!ApyQEauTSLtO6nxW30nxFEOpoPEw?e=d7CFH1" target="_self"&gt;OneDrive: Get Min and Max Per Quality in Power Query (M)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 08:57:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777672#M4008</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-28T08:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a table based on a column's highest value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777861#M4018</link>
      <description>&lt;P&gt;Thanks Anonymous&lt;/LI-USER&gt;&amp;nbsp; and &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6614" data-lia-user-login="Greg" class="lia-mention lia-mention-user"&gt;Greg&lt;/a&gt;&amp;nbsp; for your solutions. My description of the issue is probably not accurate enough. What I am looking for is not retrieving the minimum quantity for each quantity. I want to retrieve the quantity for the Maximum value in "Period".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for Quality "A", I want to retrieve the quantity where the value "Period" is the highest, so 10, not 13.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I would like to do the same for the minimum Period (so retrieve Quantity 5 for Quality A in Anonymous&lt;/a&gt;&amp;nbsp;'s example).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the end, I would divide the Quantity for the highest Period by the Quantity for the lowest Period, for each Quality. That would give me an index, which is the scope of all the above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought that DAX was the right language to solve this question but I didn't figure out how, despite may trials.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 11:37:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777861#M4018</guid>
      <dc:creator>jopezzo</dc:creator>
      <dc:date>2019-08-28T11:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a table based on a column's highest value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777879#M4022</link>
      <description>&lt;P&gt;OK. So you need another table (created in PQ) that for each quality will store the quantities for the latest and oldest period.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll post a link to a file shortly.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;Dare&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 11:56:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777879#M4022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-28T11:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a table based on a column's highest value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777909#M4026</link>
      <description>&lt;P&gt;Yes, I think that should be a way to go. :-)&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 12:24:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777909#M4026</guid>
      <dc:creator>jopezzo</dc:creator>
      <dc:date>2019-08-28T12:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a table based on a column's highest value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777912#M4027</link>
      <description>Please use the same link as above.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D.</description>
      <pubDate>Wed, 28 Aug 2019 12:25:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-filter-a-table-based-on-a-column-s-highest-value/m-p/777912#M4027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-28T12:25:09Z</dc:date>
    </item>
  </channel>
</rss>

