<?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: Find the max of a column with filters from other columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-max-of-a-column-with-filters-from-other-columns/m-p/2298663#M56688</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;You can achieve this with e.g. ALLEXCEPT:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;=CALCULATE(max(FACT_Orders[Line Price]),ALLEXCEPT(FACT_Orders[Barcode]))&lt;BR /&gt;The idea here is to remove all the other filters except for the barcode and get the max value.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jan 2022 13:47:57 GMT</pubDate>
    <dc:creator>ValtteriN</dc:creator>
    <dc:date>2022-01-24T13:47:57Z</dc:date>
    <item>
      <title>Find the max of a column with filters from other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-max-of-a-column-with-filters-from-other-columns/m-p/2298631#M56687</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a column in my shopify data that compiles price and discount price as &lt;STRONG&gt;line price&lt;/STRONG&gt;. I want to calculate total discount, to do so based on the unique barcode return the max value (&lt;STRONG&gt;line price&lt;/STRONG&gt;) for a given barcode. I will after subtract the difference of the new column and "line price" to calculate discounts. However my formula (below) will generate the row value rather than the max value for a given barcode. Added complication I need to exclude all blank values in column barcode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Dataset&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Column A: Line price&lt;/P&gt;&lt;P&gt;Column B: Barcode&lt;/P&gt;&lt;P&gt;New column C (&lt;U&gt;objective&lt;/U&gt;)&amp;nbsp;find max value for any given barcode&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=CALCULATE(max(FACT_Orders[Line Price]),DISTINCT(FACT_Orders[Barcode]),FACT_Orders[Barcode]&amp;lt;&amp;gt; BLANK())&lt;/P&gt;&lt;P&gt;Could someone please help me out?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 13:37:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-max-of-a-column-with-filters-from-other-columns/m-p/2298631#M56687</guid>
      <dc:creator>stino123</dc:creator>
      <dc:date>2022-01-24T13:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Find the max of a column with filters from other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-max-of-a-column-with-filters-from-other-columns/m-p/2298663#M56688</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;You can achieve this with e.g. ALLEXCEPT:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;=CALCULATE(max(FACT_Orders[Line Price]),ALLEXCEPT(FACT_Orders[Barcode]))&lt;BR /&gt;The idea here is to remove all the other filters except for the barcode and get the max value.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 13:47:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-max-of-a-column-with-filters-from-other-columns/m-p/2298663#M56688</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-01-24T13:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Find the max of a column with filters from other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-max-of-a-column-with-filters-from-other-columns/m-p/2298678#M56690</link>
      <description>&lt;P&gt;Hey Valtteri,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This helped allot, for those products that don't have barcodes how do you exclude it from the equation? since now the few products that have "blank" cells&amp;nbsp; within the column "barcode" all have the same price.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 14:02:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-max-of-a-column-with-filters-from-other-columns/m-p/2298678#M56690</guid>
      <dc:creator>stino123</dc:creator>
      <dc:date>2022-01-24T14:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find the max of a column with filters from other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-max-of-a-column-with-filters-from-other-columns/m-p/2298712#M56691</link>
      <description>&lt;P&gt;Figured it out:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Full price = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FACT_Orders[Barcode]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FACT_Orders[Line Price]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FACT_Orders&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;FACT_Orders[Barcode]&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FACT_Orders[Line Price]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks again for the help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jan 2022 14:12:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-max-of-a-column-with-filters-from-other-columns/m-p/2298712#M56691</guid>
      <dc:creator>stino123</dc:creator>
      <dc:date>2022-01-24T14:12:50Z</dc:date>
    </item>
  </channel>
</rss>

