<?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: Ignore RLS and get the rank in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116258#M163405</link>
    <description>&lt;P&gt;use CALCULATETABLE instead of FILTER&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2024 17:22:11 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-08-23T17:22:11Z</dc:date>
    <item>
      <title>Ignore RLS and get the rank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116219#M163402</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have Employee-wise RLS on the &lt;STRONG&gt;Active agent's table, &lt;/STRONG&gt;but I have a separate table called &lt;STRONG&gt;&lt;STRONG&gt;All metrics&amp;nbsp;that has KPIs (1-1 relationship)&lt;STRONG&gt;. &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;Now when I applied RLS the ranks show as 1. This is expected behaviour but while finding a workaround, I got to know by removing the relationship between these tables and using the TREATAS function we can get the rank.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I tried many ways but couldn't find a solution. Here is the measure used for finding team-wise rank for selected employees:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Team rank =
VAR table_ =
ADDCOLUMNS(
  FILTER(
    all('All Metrics'[Employee Name],
       'All Metrics'[Supervisor 1 (Team Manager) ]),
           'All Metrics'[Supervisor 1 (Team Manager)] = MAX('All Metrics'[Supervisor 1 (Team Manager) ])
           ),"attain", 
    [Resolve Attainment]
)
Return
Format(rankx(table_,[Resolve Attainment],,desc,Dense), 0)&amp;amp;"/"&amp;amp;COUNTROWS(table_)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;STRONG&gt;Expected Result is like - 05/10&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Aug 2024 16:55:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116219#M163402</guid>
      <dc:creator>Sri_phani</dc:creator>
      <dc:date>2024-08-23T16:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore RLS and get the rank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116249#M163403</link>
      <description>&lt;P&gt;Read about CROSSFILTER(,,NONE) - that allows you to temporarily break relationships.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 17:09:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116249#M163403</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-23T17:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore RLS and get the rank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116251#M163404</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;How do I incorporate Crossfilters in this measure?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Team rank =
VAR table_ =
ADDCOLUMNS(
  FILTER(
    all('All Metrics'[Employee Name],
       'All Metrics'[Supervisor 1 (Team Manager) ]),
           'All Metrics'[Supervisor 1 (Team Manager)] = MAX('All Metrics'[Supervisor 1 (Team Manager) ])
           ),"attain", 
    [Resolve Attainment]
)
Return
Format(rankx(table_,[Resolve Attainment],,desc,Dense), 0)&amp;amp;"/"&amp;amp;COUNTROWS(table_)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 17:11:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116251#M163404</guid>
      <dc:creator>Sri_phani</dc:creator>
      <dc:date>2024-08-23T17:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore RLS and get the rank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116258#M163405</link>
      <description>&lt;P&gt;use CALCULATETABLE instead of FILTER&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 17:22:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116258#M163405</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-23T17:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore RLS and get the rank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116282#M163406</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;I tried using Calculatetable instead of filter, it is giving blanks as well in the result. Sorry, I am finding it hard to understand how can I put a stop to RLS while using Calculatetable function.&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 17:32:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116282#M163406</guid>
      <dc:creator>Sri_phani</dc:creator>
      <dc:date>2024-08-23T17:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore RLS and get the rank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116308#M163410</link>
      <description>&lt;P&gt;There is an alternative - use a shadow table that is disconnected from the data model.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 17:50:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116308#M163410</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-23T17:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore RLS and get the rank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116352#M163413</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;Second table - ALL Metrics table is a disconnected table only on which Rank is created.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 18:33:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-RLS-and-get-the-rank/m-p/4116352#M163413</guid>
      <dc:creator>Sri_phani</dc:creator>
      <dc:date>2024-08-23T18:33:06Z</dc:date>
    </item>
  </channel>
</rss>

