<?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: Returning Top and Bottom 10 Ranked Items in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-Top-and-Bottom-10-Ranked-Items/m-p/3039606#M104197</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I assume [Score] is a measure and you want to create table visualization.&lt;/P&gt;
&lt;P&gt;Please try to write a measure something like below.&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;Top 10 rank measure: =
CALCULATE (
    [Score],
    KEEPFILTERS ( TOPN ( 10, ALL ( Clubs[Club Name] ), [Score], DESC ) )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 08:28:16 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2023-01-24T08:28:16Z</dc:date>
    <item>
      <title>Returning Top and Bottom 10 Ranked Items</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-Top-and-Bottom-10-Ranked-Items/m-p/3039405#M104186</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am buildinga report for a sports organisation.&amp;nbsp; We've come up with a methodology that ranks clubs.&amp;nbsp; The methodology currently covers three different facets of the clubs at the moment.&amp;nbsp; Those being Future Club Prospects, Club Popularity and Club Support.&amp;nbsp; Each club is ranked against each of three facets separately and then the governing body can determine a weighting for each facet.&amp;nbsp; For example, Future Prospects might have a weighting of 50%, Popularity might be weighted at 30% and Support is therefore 20%.&amp;nbsp; Each of the three separate rankings is multiplied by their weighting and all three are added together to generate a score.&amp;nbsp; I then want to rank all clubs by their score.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above is working well for me with the dax I have posted below.&amp;nbsp; However, I'd like to modify it to only return a table that shows the Top 10 Clubs who would be deemed to be 'Thriving'.&amp;nbsp; I'd also like to return a second table that only shows the Bottom 10 Clubs who would be deemed to be 'At Risk'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling to return the two separate tables I need above.&amp;nbsp; Can someone please assist?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my dax to determine each club's score:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Score = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;Score&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN&gt;[4Yr Player Pool Share Rankings]&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Share of Playing Pool Weighting'&lt;/SPAN&gt;&lt;SPAN&gt;[Selected Weighting]&lt;/SPAN&gt;&lt;SPAN&gt;)) +&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN&gt;[4Yr Youth &amp;amp; Senior Growth Rankings]&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Share of Youth &amp;amp; Senior Growth Weighting'&lt;/SPAN&gt;&lt;SPAN&gt;[Selected Weighting]&lt;/SPAN&gt;&lt;SPAN&gt;)) +&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN&gt;[4Yr Weighted Player to Volunteer Rankings]&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Share of Player to Volunteer Ratio Weighting'&lt;/SPAN&gt;&lt;SPAN&gt;[Selected Weighting]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;Score&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This is my dax to then rank each club based on their score:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Rank = &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Clubs&lt;/SPAN&gt;&lt;SPAN&gt;[Club Name]&lt;/SPAN&gt;&lt;SPAN&gt; ), &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Score]&lt;/SPAN&gt;&lt;SPAN&gt;),,&lt;/SPAN&gt;&lt;SPAN&gt;DESC&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Many thanks in advance!&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 06:30:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-Top-and-Bottom-10-Ranked-Items/m-p/3039405#M104186</guid>
      <dc:creator>RNZALR</dc:creator>
      <dc:date>2023-01-24T06:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Top and Bottom 10 Ranked Items</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-Top-and-Bottom-10-Ranked-Items/m-p/3039606#M104197</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I assume [Score] is a measure and you want to create table visualization.&lt;/P&gt;
&lt;P&gt;Please try to write a measure something like below.&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;Top 10 rank measure: =
CALCULATE (
    [Score],
    KEEPFILTERS ( TOPN ( 10, ALL ( Clubs[Club Name] ), [Score], DESC ) )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 08:28:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-Top-and-Bottom-10-Ranked-Items/m-p/3039606#M104197</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-01-24T08:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Top and Bottom 10 Ranked Items</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-Top-and-Bottom-10-Ranked-Items/m-p/3039741#M104209</link>
      <description>&lt;P&gt;Hi Jihwan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is very nearly the answer I think.&amp;nbsp; I am getting a few issues though:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The value being returned appears to be a score rather than a ranking number.&amp;nbsp; I'd like it to be a rank as this is easily understanding to the user.&lt;/LI&gt;&lt;LI&gt;All clubs after the top 10 continue to appear and have been given a score of 1.&amp;nbsp; I'd like them to vanish completely so that the list only returns 10.&amp;nbsp; I know I could filter them out in the filter pane by removing values that = 1 but I presume there is a better way.&lt;/LI&gt;&lt;LI&gt;The list returned differs in order from the list I have already got set up as a heat map.&amp;nbsp; Below is a screen shot of what I am getting.&amp;nbsp; I have a slicer on the page and have set it to the 2022 season.&amp;nbsp; My matrix ranks all clubs from 1 down to the very last club.&amp;nbsp; This is done using the Club names in the Rows and the dax measure called Rank that I shared in my original post.&amp;nbsp; On top and to the right I've put a table using the Club names again but this time the measure is the dax you gave me above called Top 10 Rank.&amp;nbsp; You'll note:&lt;OL&gt;&lt;LI&gt;The clubs in the top 10 in both lists are the same&lt;/LI&gt;&lt;LI&gt;The order in which they appear in each list is different.&amp;nbsp; I would like them to be in the same order and I'd preferably like the ranking shown rather than a score which to be honest, I don't really recognise.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Your thoughts would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 09:27:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-Top-and-Bottom-10-Ranked-Items/m-p/3039741#M104209</guid>
      <dc:creator>RNZALR</dc:creator>
      <dc:date>2023-01-24T09:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Top and Bottom 10 Ranked Items</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-Top-and-Bottom-10-Ranked-Items/m-p/3039781#M104211</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you very much for your message.&lt;/P&gt;
&lt;P&gt;If it is OK with you, please share your sample pbix file's link (onedrive, googledrive, dropbox, others), and then I can try to come up with a more accurate solution that meets your requirement.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 09:39:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-Top-and-Bottom-10-Ranked-Items/m-p/3039781#M104211</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-01-24T09:39:45Z</dc:date>
    </item>
  </channel>
</rss>

