<?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: Ranking with multiple filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-with-multiple-filters/m-p/859831#M6931</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A title="" href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/167467" target="_blank" rel="noopener"&gt;@vimal_parmar&lt;/A&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for your solution. It seems to work in the following scenario:&lt;/P&gt;&lt;P&gt;1. Your rank in 1 region (IRE)&lt;/P&gt;&lt;P&gt;2. Your rank in 'All regions' (IRE, FRA, GER )&lt;/P&gt;&lt;P&gt;However the additional scenario is&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Your rank against multiple filtered regions e.g.&amp;nbsp; (IRE and FRA) or (IRE,&amp;nbsp;IND, GER, US, UK) or any combination.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment I found a solution where I can dynamically get the ranking using measures but it doesn't output on a card. It seems to lose context an return 1.&amp;nbsp; Do you know if you can only do ranking using tables and calculated columns ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just for your info. below is what the current solution looks like. It seems to work but it would be better to output on a card.&lt;/P&gt;&lt;P&gt;Thanks again for your solution and help.&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Your rank in 1 region (IRE)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;2. Your rank in 'All regions' (IRE, FRA, GER )&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;3. Your rank against multiple filtered regions e.g.&amp;nbsp; (IRE and FRA) or (IRE,&amp;nbsp;IND, GER, US, UK) or any combination.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Tables:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Measures:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;img /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Nov 2019 15:23:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-11-28T15:23:19Z</dc:date>
    <item>
      <title>Ranking with multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-with-multiple-filters/m-p/857541#M6864</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having difficultly creating a card which displays the ranking for a company against other companies in it's region or if they change the filter to their ranking against companies in all regions. Ideally the output would be as follows:&lt;/P&gt;&lt;P&gt;You are ranked [ X ] out of [ Y ]&lt;/P&gt;&lt;P&gt;Where [ X ] is their ranking and&amp;nbsp;[ Y ] depends on their region (default view) or regions selected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Company A logs on to the report so a page filter is applied&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Company A belongs to a region with other companies&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Company A should see their ranking in their region (but shouldn't see the information related to other companies)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;e.g. You are ranked 2 out of 3 (for their region)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. If they change the filter on Region to ALL they should be able to see their ranking across all regions &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;e.g. You are ranked 6th out of 8&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any hints/tips would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 17:56:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-with-multiple-filters/m-p/857541#M6864</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-26T17:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking with multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-with-multiple-filters/m-p/857921#M6871</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;Please create following calculated column and check if it works&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AllRegion = 
VAR _count = COUNT('Table'[Company])
VAR _rank = RANKX('Table','Table'[Sales],,DESC,Dense)
RETURN CONCATENATE("You are ranked ",CONCATENATE(_rank,CONCATENATE(" Out of ",_count)))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;WithinRegion = 
VAR _name = 'Table'[Region]
VAR _count = CALCULATE(COUNT('Table'[Region]),ALLEXCEPT('Table','Table'[Region]))
VAR _rank = RANKX(FILTER('Table','Table'[Region]=_name),'Table'[Sales],,DESC,Dense)
RETURN CONCATENATE("You are ranked ",CONCATENATE(_rank,CONCATENATE(" Out of ",_count)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 03:59:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-with-multiple-filters/m-p/857921#M6871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-27T03:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking with multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-with-multiple-filters/m-p/858571#M6895</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;, Thank-you for taking the time with this. I'll set it up and let you know how it goes.&amp;nbsp; Helen&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 14:19:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-with-multiple-filters/m-p/858571#M6895</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-27T14:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking with multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-with-multiple-filters/m-p/859831#M6931</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A title="" href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/167467" target="_blank" rel="noopener"&gt;@vimal_parmar&lt;/A&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for your solution. It seems to work in the following scenario:&lt;/P&gt;&lt;P&gt;1. Your rank in 1 region (IRE)&lt;/P&gt;&lt;P&gt;2. Your rank in 'All regions' (IRE, FRA, GER )&lt;/P&gt;&lt;P&gt;However the additional scenario is&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Your rank against multiple filtered regions e.g.&amp;nbsp; (IRE and FRA) or (IRE,&amp;nbsp;IND, GER, US, UK) or any combination.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment I found a solution where I can dynamically get the ranking using measures but it doesn't output on a card. It seems to lose context an return 1.&amp;nbsp; Do you know if you can only do ranking using tables and calculated columns ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just for your info. below is what the current solution looks like. It seems to work but it would be better to output on a card.&lt;/P&gt;&lt;P&gt;Thanks again for your solution and help.&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Your rank in 1 region (IRE)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;2. Your rank in 'All regions' (IRE, FRA, GER )&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;3. Your rank against multiple filtered regions e.g.&amp;nbsp; (IRE and FRA) or (IRE,&amp;nbsp;IND, GER, US, UK) or any combination.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Tables:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Measures:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;img /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 15:23:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-with-multiple-filters/m-p/859831#M6931</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-28T15:23:19Z</dc:date>
    </item>
  </channel>
</rss>

