<?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 MAX value separately by one column's different values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-value-separately-by-one-column-s-different-values/m-p/2099951#M47906</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have a DAX to solve this (I could create a helper table quite easily in QE). Example table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Cost per item&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;US&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;1.1.2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;1.2.2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;1.3.2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;GB&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;1.4.2021&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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;&lt;P&gt;What I would like to achieve?&lt;/P&gt;&lt;P&gt;- DAX would be called "Cost per item by country"&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Logic: the MAX Value by country regardless of the date&lt;/P&gt;&lt;P&gt;-Use case: this would be used as helper measure to calculate total cost ([Cost per item by country] * [Volume] -&amp;gt; I need to take into consideration country differences in cost price, but no timeline/date differences (just use the max of the country).&lt;/P&gt;</description>
    <pubDate>Mon, 27 Sep 2021 08:52:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-09-27T08:52:29Z</dc:date>
    <item>
      <title>MAX value separately by one column's different values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-value-separately-by-one-column-s-different-values/m-p/2099951#M47906</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have a DAX to solve this (I could create a helper table quite easily in QE). Example table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Cost per item&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;US&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;1.1.2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;1.2.2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;1.3.2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;GB&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;1.4.2021&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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;&lt;P&gt;What I would like to achieve?&lt;/P&gt;&lt;P&gt;- DAX would be called "Cost per item by country"&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Logic: the MAX Value by country regardless of the date&lt;/P&gt;&lt;P&gt;-Use case: this would be used as helper measure to calculate total cost ([Cost per item by country] * [Volume] -&amp;gt; I need to take into consideration country differences in cost price, but no timeline/date differences (just use the max of the country).&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 08:52:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-value-separately-by-one-column-s-different-values/m-p/2099951#M47906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-27T08:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: MAX value separately by one column's different values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-value-separately-by-one-column-s-different-values/m-p/2100033#M47908</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Use this measure:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cost per item by country = 
CALCULATE(  
    MAX(Table[Cost per item]),
    REMOVEFILTERS(Table[Date])
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Sep 2021 09:17:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-value-separately-by-one-column-s-different-values/m-p/2100033#M47908</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2021-09-27T09:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: MAX value separately by one column's different values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-value-separately-by-one-column-s-different-values/m-p/2107563#M48172</link>
      <description>&lt;P&gt;I think your suggestion only does the removal of time/date in the formula. In my model the main problem is that it that current formula suggestions do not do the calculations by row/country if my table does not have a country in it. So if I dont have country the MAX chooses the largest number of the whole table (without considering the country differences) and thus the total result is wrong. If country is a dimension in the table, then it calculates it correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did a workaround and created just a helper table for this and it of course did the trick. Maybe some day I know how to work these around directly with DAX (or understand when it does not make sense to try to tackle with DAX).&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 07:56:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-value-separately-by-one-column-s-different-values/m-p/2107563#M48172</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-30T07:56:25Z</dc:date>
    </item>
  </channel>
</rss>

