<?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 Top 3 per category in a pivot table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-3-per-category-in-a-pivot-table/m-p/2730664#M83604</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to group the top 3 stores for a metric by their district in the same pivot table. Example below...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to show the top 3 in each district. Any help is appreciated!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 28 Aug 2022 06:13:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-08-28T06:13:49Z</dc:date>
    <item>
      <title>Top 3 per category in a pivot table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-3-per-category-in-a-pivot-table/m-p/2730664#M83604</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to group the top 3 stores for a metric by their district in the same pivot table. Example below...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to show the top 3 in each district. Any help is appreciated!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 06:13:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-3-per-category-in-a-pivot-table/m-p/2730664#M83604</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-28T06:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Top 3 per category in a pivot table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-3-per-category-in-a-pivot-table/m-p/2730687#M83607</link>
      <description>&lt;P&gt;Create a helper measure that will return 1 for any top 3 stores in any of the districts and then filter the visual by this value on this very measure. This will then hide the other stores and you'll only see what you want.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 07:03:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-3-per-category-in-a-pivot-table/m-p/2730687#M83607</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-08-28T07:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Top 3 per category in a pivot table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-3-per-category-in-a-pivot-table/m-p/2730708#M83614</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;In case you want to create a table, please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Top three per district table =
VAR _topthreestorelist =
    SUMMARIZE (
        GENERATE (
            VALUES ( Data[District] ),
            SUMMARIZE (
                TOPN (
                    3,
                    FILTER ( Data, Data[District] = EARLIER ( Data[District] ) ),
                    Data[Sales], DESC
                ),
                Data[Store]
            )
        ),
        Data[Store]
    )
RETURN
    CALCULATETABLE ( Data, Data[Store] IN _topthreestorelist )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 07:42:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-3-per-category-in-a-pivot-table/m-p/2730708#M83614</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-08-28T07:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Top 3 per category in a pivot table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-3-per-category-in-a-pivot-table/m-p/2730723#M83618</link>
      <description>&lt;LI-CODE lang="markup"&gt;TOP_N = 
VAR __topn =
    TOPN(
        MAX( N[Value] ),
        CALCULATETABLE(
            SUMMARIZE( Data, Data[District], Data[Store] ),
            ALLSELECTED( Data[Store] )
        ),
        [Total]
    )
RETURN
    CALCULATE( [Total], KEEPFILTERS( __topn ) )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 08:29:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-3-per-category-in-a-pivot-table/m-p/2730723#M83618</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2022-08-28T08:29:59Z</dc:date>
    </item>
  </channel>
</rss>

