<?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: get a MAX of a group and still be able to filter? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-a-MAX-of-a-group-and-still-be-able-to-filter/m-p/1917896#M41552</link>
    <description>&lt;LI-CODE lang="csharp"&gt;[Total Revenue] = SUM( FactRevenue[Revenue] )

[Max By Cust &amp;amp; Sect] =
MAXX(
    SUMMARIZE(
        -- Fact tables must be hidden and no slicing
        -- by their columns should be performed.
        -- Dimensions are the correct entities to
        -- slice by.
        FactRevenue,
        -- CustomerID needs to be the unique
        -- identifier of Customer
        Customer[CustomerID],
        Customer[Sector]
    ),
    [Total Revenue]
)&lt;/LI-CODE&gt;&lt;P&gt;ALLEXCEPT is a tricky function that should only be used if you fully understand what it does. Otherwise, you'll almost always get it wrong. See the description: &lt;A href="https://dax.guide/ALLEXCEPT/" target="_blank"&gt;ALLEXCEPT – DAX Guide&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd also kindly suggest you read this:&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept/" target="_blank"&gt;Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT - SQLBI&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jun 2021 15:23:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-06-23T15:23:13Z</dc:date>
    <item>
      <title>get a MAX of a group and still be able to filter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-a-MAX-of-a-group-and-still-be-able-to-filter/m-p/1917292#M41519</link>
      <description>&lt;P&gt;I have&amp;nbsp; a Fact Revenue, and I am trying to get the MAX of a &lt;STRONG&gt;group&lt;/STRONG&gt;…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to group&amp;nbsp; revenue by &lt;STRONG&gt;Customer&lt;/STRONG&gt; and &lt;STRONG&gt;Sector&lt;/STRONG&gt;… and then pick the &lt;STRONG&gt;MAX&lt;/STRONG&gt; for each &lt;STRONG&gt;Customer&lt;/STRONG&gt;…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I can do this visually when I put in a Matrix, Customer, Sector and Revenue).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below measures do the work for me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SubTotalCustomerSec =&lt;/P&gt;&lt;P&gt;CALCULATE ( SUM(FactRevenue[Revenue]), ALLEXCEPT ( FactRevenue, 'Customer'[Customer], 'Sector'[Sector] ) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MaxSecerCustomer =&lt;/P&gt;&lt;P&gt;MAXX ( ALLEXCEPT ( FactRevenue, 'Customer'[Customer] ), [SubTotalCustomerSec] )&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that I can’t filter… I want to achieve the above but still be able to select a specific Customer or pick a specific value for a higher level than customer…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I select any specific Customer or ParentCustomer and add my above measures, the matrix brings all the rows for all ParentCustomers...&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 11:20:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-a-MAX-of-a-group-and-still-be-able-to-filter/m-p/1917292#M41519</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-23T11:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: get a MAX of a group and still be able to filter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-a-MAX-of-a-group-and-still-be-able-to-filter/m-p/1917896#M41552</link>
      <description>&lt;LI-CODE lang="csharp"&gt;[Total Revenue] = SUM( FactRevenue[Revenue] )

[Max By Cust &amp;amp; Sect] =
MAXX(
    SUMMARIZE(
        -- Fact tables must be hidden and no slicing
        -- by their columns should be performed.
        -- Dimensions are the correct entities to
        -- slice by.
        FactRevenue,
        -- CustomerID needs to be the unique
        -- identifier of Customer
        Customer[CustomerID],
        Customer[Sector]
    ),
    [Total Revenue]
)&lt;/LI-CODE&gt;&lt;P&gt;ALLEXCEPT is a tricky function that should only be used if you fully understand what it does. Otherwise, you'll almost always get it wrong. See the description: &lt;A href="https://dax.guide/ALLEXCEPT/" target="_blank"&gt;ALLEXCEPT – DAX Guide&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd also kindly suggest you read this:&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept/" target="_blank"&gt;Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT - SQLBI&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 15:23:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-a-MAX-of-a-group-and-still-be-able-to-filter/m-p/1917896#M41552</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-23T15:23:13Z</dc:date>
    </item>
  </channel>
</rss>

