<?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: Measure that returns the Max value by multiple catagories in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3640123#M140920</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Certainly! In Power BI, you can create a DAX measure to return the maximum value by multiple categories. Assuming you have a table with the relevant data, and you want to find the maximum value based on certain categories, you can use the following DAX formula as an example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MaxValueByCategory =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;MAX('YourTableName'[YourNumericColumn]),&lt;BR /&gt;ALLEXCEPT('YourTableName', 'CategoryColumn1', 'CategoryColumn2', ...)&lt;BR /&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here, replace 'YourTableName' with the actual name of your table, 'YourNumericColumn' with the column containing the values you want to find the maximum of, and 'CategoryColumn1', 'CategoryColumn2', etc., with the columns representing your categories.&lt;/P&gt;&lt;P&gt;The ALLEXCEPT function removes all filters from the table except for the specified columns, ensuring that the maximum is calculated within the selected categories.&lt;/P&gt;&lt;P&gt;For example, if you have a Sales table with columns 'Product', 'Region', and 'SalesAmount', and you want to find the maximum sales amount by product and region, the formula would look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MaxSalesByProductAndRegion =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;MAX('Sales'[SalesAmount]),&lt;BR /&gt;ALLEXCEPT('Sales', 'Product', 'Region')&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Adjust the column names based on your specific dataset and requirements. If you have more than two categories, include additional columns within the &lt;/SPAN&gt;ALLEXCEPT&lt;SPAN&gt; function.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jan 2024 05:19:02 GMT</pubDate>
    <dc:creator>123abc</dc:creator>
    <dc:date>2024-01-16T05:19:02Z</dc:date>
    <item>
      <title>Measure that returns the Max value by multiple catagories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3638138#M140805</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello Authors I am in a bite of bind please help I want to make a DAX Measure that returns the top or MAX value only by that categories please Guide me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 06:24:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3638138#M140805</guid>
      <dc:creator>hello_</dc:creator>
      <dc:date>2024-01-15T06:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Measure that returns the Max value by multiple catagories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3640123#M140920</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Certainly! In Power BI, you can create a DAX measure to return the maximum value by multiple categories. Assuming you have a table with the relevant data, and you want to find the maximum value based on certain categories, you can use the following DAX formula as an example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MaxValueByCategory =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;MAX('YourTableName'[YourNumericColumn]),&lt;BR /&gt;ALLEXCEPT('YourTableName', 'CategoryColumn1', 'CategoryColumn2', ...)&lt;BR /&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here, replace 'YourTableName' with the actual name of your table, 'YourNumericColumn' with the column containing the values you want to find the maximum of, and 'CategoryColumn1', 'CategoryColumn2', etc., with the columns representing your categories.&lt;/P&gt;&lt;P&gt;The ALLEXCEPT function removes all filters from the table except for the specified columns, ensuring that the maximum is calculated within the selected categories.&lt;/P&gt;&lt;P&gt;For example, if you have a Sales table with columns 'Product', 'Region', and 'SalesAmount', and you want to find the maximum sales amount by product and region, the formula would look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MaxSalesByProductAndRegion =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;MAX('Sales'[SalesAmount]),&lt;BR /&gt;ALLEXCEPT('Sales', 'Product', 'Region')&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Adjust the column names based on your specific dataset and requirements. If you have more than two categories, include additional columns within the &lt;/SPAN&gt;ALLEXCEPT&lt;SPAN&gt; function.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 05:19:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3640123#M140920</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-01-16T05:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Measure that returns the Max value by multiple catagories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3640565#M140936</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="674545" data-lia-user-login="hello_" class="lia-mention lia-mention-user"&gt;hello_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please follow these steps:&lt;/P&gt;
&lt;P&gt;1.You can create a new metric and write the following expression.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =

var _max_cou =

MAXX(

    FILTER(

        ALL('Table'),

        'Table'[Category_1]=MAX('Table'[Category_1])&amp;amp;&amp;amp;'Table'[Category_2]=MAX('Table'[Category_2])),

    [Count_Category])

RETURN

IF(MAX('Table'[Count_Category]) = _max_cou,

_max_cou,

BLANK()

)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2.The results obtained are shown below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If your Current Period does not refer to this, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;Best Regards,&lt;/SUP&gt;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;Clara Gong&lt;/SUP&gt;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/SUP&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 09:09:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3640565#M140936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-16T09:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Measure that returns the Max value by multiple catagories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3645855#M141178</link>
      <description>&lt;P&gt;Thank You Sir for the solution it helps&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 12:14:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3645855#M141178</guid>
      <dc:creator>hello_</dc:creator>
      <dc:date>2024-01-18T12:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Measure that returns the Max value by multiple catagories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3645862#M141179</link>
      <description>&lt;P&gt;Thank You very much&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 12:16:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-returns-the-Max-value-by-multiple-catagories/m-p/3645862#M141179</guid>
      <dc:creator>hello_</dc:creator>
      <dc:date>2024-01-18T12:16:20Z</dc:date>
    </item>
  </channel>
</rss>

