<?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: Top N slicer using measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-slicer-using-measure/m-p/2847860#M91175</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="457922" data-lia-user-login="TSki" class="lia-mention lia-mention-user"&gt;TSki&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want to count the number of the most&lt;SPAN&gt;&amp;nbsp;most repeated values and then use it as slicer? If so, please try following steps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is my test table:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a new column instead of a measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;The most repeated values = CALCULATE(COUNT('Table'[Category Level 1]),FILTER('Table','Table'[Category Level 1] = EARLIER('Table'[Category Level 1])))&lt;/LI-CODE&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;Create a slicer using the column just created:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If I misunderstand your demands, please feel free to contact us in time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Yadong Fang&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Oct 2022 02:07:58 GMT</pubDate>
    <dc:creator>v-yadongf-msft</dc:creator>
    <dc:date>2022-10-18T02:07:58Z</dc:date>
    <item>
      <title>Top N slicer using measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-slicer-using-measure/m-p/2847709#M91169</link>
      <description>&lt;P&gt;I am trying to make a sliding slicer off of this measure. I found this code from another user that, gives the TOPN for using COUNTROW to get the TOPN of the most repeated values.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Measure =
VAR __topn =
    TOPN (
        5,
        VALUES ( Table[Category Level 1] ),
        RANKX ( ALL ( Table[Category Level 1] ), COUNTROWS ( Table ),, ASC )
    )
RETURN
    CALCULATE ( COUNTROWS ( Table ), __topn )&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;My is slicer is called "TOPN" and it can be slid from 0-20, where the number it is on should be the number of top values shown.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 23:03:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-slicer-using-measure/m-p/2847709#M91169</guid>
      <dc:creator>TSki</dc:creator>
      <dc:date>2022-10-17T23:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Top N slicer using measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-slicer-using-measure/m-p/2847860#M91175</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="457922" data-lia-user-login="TSki" class="lia-mention lia-mention-user"&gt;TSki&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want to count the number of the most&lt;SPAN&gt;&amp;nbsp;most repeated values and then use it as slicer? If so, please try following steps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is my test table:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a new column instead of a measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;The most repeated values = CALCULATE(COUNT('Table'[Category Level 1]),FILTER('Table','Table'[Category Level 1] = EARLIER('Table'[Category Level 1])))&lt;/LI-CODE&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;Create a slicer using the column just created:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If I misunderstand your demands, please feel free to contact us in time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Yadong Fang&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 02:07:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-slicer-using-measure/m-p/2847860#M91175</guid>
      <dc:creator>v-yadongf-msft</dc:creator>
      <dc:date>2022-10-18T02:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Top N slicer using measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-slicer-using-measure/m-p/2849219#M91259</link>
      <description>&lt;P&gt;Thanks for your reply&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="414895" data-lia-user-login="v-yadongf-msft" class="lia-mention lia-mention-user"&gt;v-yadongf-msft&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this new column, can I apply a TOPN measure to it and then apply to a slicer? Where a one on the slicer displays the most repeated value, 2 shows the top 2 most repeated values, and so on. So in your test data, when the slicer is slid to 1: B will be displayed and when slid 2: B and D are displayed, when on 3: B, D, E, A are displayed and on 4: B, D, E, A, C are displayed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 13:35:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-slicer-using-measure/m-p/2849219#M91259</guid>
      <dc:creator>TSki</dc:creator>
      <dc:date>2022-10-18T13:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Top N slicer using measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-slicer-using-measure/m-p/2857944#M91937</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="457922" data-lia-user-login="TSki" class="lia-mention lia-mention-user"&gt;TSki&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, you can't add measure to slicer. As an alternative, you can create a new column:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TOPN = RANKX('Table',[The most repeated values],,DESC,Dense)&lt;/LI-CODE&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 think this is pretty close to what you want:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Or like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Yadong Fang&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 03:04:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-slicer-using-measure/m-p/2857944#M91937</guid>
      <dc:creator>v-yadongf-msft</dc:creator>
      <dc:date>2022-10-24T03:04:55Z</dc:date>
    </item>
  </channel>
</rss>

