<?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 Items (Comparison / Lookup) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-Items-Comparison-Lookup/m-p/4020365#M158603</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&amp;nbsp; This works!!!&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2024 11:40:14 GMT</pubDate>
    <dc:creator>Oros</dc:creator>
    <dc:date>2024-07-02T11:40:14Z</dc:date>
    <item>
      <title>Top Items (Comparison / Lookup)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-Items-Comparison-Lookup/m-p/4009461#M157689</link>
      <description>&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have a TOP N with measures to rank by sales ($) each product. It can rank as COMPANY-wide or per Salesperson (like BOB).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What would be the correct measure or column to add to show that Bob is missing out on the top item/s of the COMPANY?&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In the example below, I would like to show that Bob is NOT selling Apple and Strawberry.&amp;nbsp; In other words, I would like to show what items are NOT in Bob's list compared to COMPANY.&amp;nbsp; Thanks.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Jun 2024 16:07:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-Items-Comparison-Lookup/m-p/4009461#M157689</guid>
      <dc:creator>Oros</dc:creator>
      <dc:date>2024-06-25T16:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Top Items (Comparison / Lookup)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-Items-Comparison-Lookup/m-p/4010103#M157773</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="288838" data-lia-user-login="Oros" class="lia-mention lia-mention-user"&gt;Oros&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The Table data is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Please follow these steps:&lt;/P&gt;
&lt;P&gt;1. Use the following DAX expression to create a column in table 'BOB'&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank = RANKX('BOB',[Sales],,DESC,Skip)&lt;/LI-CODE&gt;
&lt;P&gt;2.Use the following DAX expression to create a column in table 'COMPANY'&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank = RANKX('COMPANY',[Sales],,DESC,Skip)&lt;/LI-CODE&gt;
&lt;P&gt;3.Use the following DAX expression to create a measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _Top5_BOB = SELECTCOLUMNS(FILTER('BOB','BOB'[Rank] &amp;lt;= 5),"Top 5",[Product])
VAR _Top5_COMPANY = SELECTCOLUMNS(FILTER('COMPANY','COMPANY'[Rank] &amp;lt;= 5),"Top 5",[Product])
VAR _Result = ADDCOLUMNS(_Top5_COMPANY,"samewithBOB",IF([Top 5] IN _Top5_BOB ,BLANK(),[Top 5]))
RETURN CONCATENATEX(FILTER(_Result,[samewithBOB] &amp;lt;&amp;gt; BLANK()),[samewithBOB],",")&lt;/LI-CODE&gt;
&lt;P&gt;4.Final output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Wenbin Zhou&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 01:56:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-Items-Comparison-Lookup/m-p/4010103#M157773</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-26T01:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Top Items (Comparison / Lookup)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-Items-Comparison-Lookup/m-p/4020365#M158603</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&amp;nbsp; This works!!!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 11:40:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-Items-Comparison-Lookup/m-p/4020365#M158603</guid>
      <dc:creator>Oros</dc:creator>
      <dc:date>2024-07-02T11:40:14Z</dc:date>
    </item>
  </channel>
</rss>

