<?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: Filter within TOPN in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2556199#M72567</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;, have you been able to solve this? I am waiting for your solution.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jun 2022 18:50:25 GMT</pubDate>
    <dc:creator>Alex_Hasan</dc:creator>
    <dc:date>2022-06-02T18:50:25Z</dc:date>
    <item>
      <title>Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2553584#M72388</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;Hi, I want to write a measure that gives the &lt;U&gt;&lt;STRONG&gt;top 10 parent customers' name&lt;/STRONG&gt;&lt;/U&gt;. The measure below &lt;STRONG&gt;only shows the name of top 10 customers&lt;/STRONG&gt; regardless of parent or not parent.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;&lt;FONT color="#3366FF"&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;&lt;FONT color="#FF00FF"&gt;&lt;SPAN&gt;[Total Sales]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;&lt;FONT color="#3366FF"&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TOPN&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;10&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;FONT color="#3366FF"&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimCustomer[FirstName]&lt;/SPAN&gt;&lt;SPAN&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF00FF"&gt;&lt;SPAN&gt;[Total Sales]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;&lt;SPAN&gt;this is the column of DimCustomer table that represents whether a customer is a parent or not. How to include this column inside that measure?&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Jun 2022 18:17:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2553584#M72388</guid>
      <dc:creator>Alex_Hasan</dc:creator>
      <dc:date>2022-06-01T18:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2553595#M72390</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you please check if the below measure works?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;new measure =
CALCULATE (
    [Total Sales],
    KEEPFILTERS (
        TOPN (
            10,
            SUMMARIZE (
                FILTER (
                    SUMMARIZE (
                        ALL ( DimCustomer ),
                        DimCustomer[FirstName],
                        DimCustomer[Is parent]
                    ),
                    DimCustomer[Is parent] = "Parent"
                ),
                DimCustomer[FirstName]
            ),
            [Total Sales]
        )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 18:34:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2553595#M72390</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-06-01T18:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2553599#M72392</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="380340" data-lia-user-login="Alex_Hasan" class="lia-mention lia-mention-user"&gt;Alex_Hasan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For some reason I've never succeeded to answer any of your questions before &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Maybe this time. Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;top 10 parent customers' name =
CALCULATE (
    [Total Sales],
    KEEPFILTERS (
        TOPN (
            10,
            FILTER (
                ALL ( DimCustomer[FirstName] ),
                CALCULATE ( VALUES ( DimCustomer[Is parent] ) ) = "Parent"
            ),
            [Total Sales]
        )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Jun 2022 18:32:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2553599#M72392</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-01T18:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2553638#M72394</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp; ha ha ha..... Most probably I couldn't make you understand my problem. But your code is not working this time. Maybe you forgot to add something in the measure. Here Jihwan Kim provided the solution and it worked.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 18:48:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2553638#M72394</guid>
      <dc:creator>Alex_Hasan</dc:creator>
      <dc:date>2022-06-01T18:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2553642#M72395</link>
      <description>&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 18:49:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2553642#M72395</guid>
      <dc:creator>Alex_Hasan</dc:creator>
      <dc:date>2022-06-01T18:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2554186#M72417</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;, I've found a problem in the measure. It's actually not showing the top 10 parents or top 10 not parents, rather top 10 customers. I've altered the code to see the effect but both are the same. On the other hand, Summerize function has a bug and Alberto Ferrari of SQLBI told to avoid this function.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 04:24:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2554186#M72417</guid>
      <dc:creator>Alex_Hasan</dc:creator>
      <dc:date>2022-06-02T04:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2554211#M72419</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your message, and please share your sample pbix file's link together with how the expected outcome looks like, and then I can try to look into it to come up with a more accurate solution.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 04:54:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2554211#M72419</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-06-02T04:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2554226#M72422</link>
      <description>&lt;P&gt;Hi, See the TOPN page. I've put three measures side by side.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AtNgJBWI0wXOdOdgTjqFwCG_k-c?e=SEHfba" target="_blank"&gt;https://1drv.ms/u/s!AtNgJBWI0wXOdOdgTjqFwCG_k-c?e=SEHfba&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 05:20:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2554226#M72422</guid>
      <dc:creator>Alex_Hasan</dc:creator>
      <dc:date>2022-06-02T05:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2556199#M72567</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;, have you been able to solve this? I am waiting for your solution.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 18:50:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2556199#M72567</guid>
      <dc:creator>Alex_Hasan</dc:creator>
      <dc:date>2022-06-02T18:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2556663#M72607</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;After I see your pbix file, I am confused and I am not sure what you want to visualize.&lt;/P&gt;
&lt;P&gt;Do you want to rank total sales by First name? For example, I see that there are so many "Aaron"s and some of them are parent and some of them are Not parent.&lt;/P&gt;
&lt;P&gt;I think you can put a correct column in the visualization to check top sales.&lt;/P&gt;
&lt;P&gt;I did not check whether the measures still work, but I inside the TOPN function in each measure, including TOP sales measure, please select the correct column, or you can just select the whole table if there are other columns involved such as sorting purpose, for instance.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 03:13:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2556663#M72607</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-06-03T03:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2556721#M72609</link>
      <description>&lt;P&gt;&amp;nbsp;Now It worked. I didn't notice the fact you just mentioned here. I've made a new column with "Full Name" and instead of choosing first name, I selected the Full Name and it worked.&amp;nbsp;Thank you so much&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 04:27:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-TOPN/m-p/2556721#M72609</guid>
      <dc:creator>Alex_Hasan</dc:creator>
      <dc:date>2022-06-03T04:27:20Z</dc:date>
    </item>
  </channel>
</rss>

