<?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: RankX Sum of Column and Slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2220901#M52717</link>
    <description>&lt;P&gt;Hi John,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So if I undestrood correctly you want to do a RANKX lsiting of employees whose total amount of transactions is more than 30?&lt;BR /&gt;&lt;BR /&gt;My test data (here the goal is to exclude Patrick and John from the ranking):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;First I placed if condition on the average metric:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Average metric = &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Ranking[Amount of transactions]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;gt;=&lt;/SPAN&gt;&lt;SPAN&gt;30&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Ranking[Average]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;Then I used this to my advantage in the Ranking measure:&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ranking = &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Average metric]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Ranking&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;Ranking&lt;/SPAN&gt;&lt;SPAN&gt;[Average metric]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Excluded from ranking&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;End result:&lt;BR /&gt;&lt;img /&gt;&lt;P&gt;&lt;BR /&gt;Hopefully this helps!&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sat, 04 Dec 2021 12:37:01 GMT</pubDate>
    <dc:creator>ValtteriN</dc:creator>
    <dc:date>2021-12-04T12:37:01Z</dc:date>
    <item>
      <title>RankX Sum of Column and Slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2220357#M52675</link>
      <description>&lt;P&gt;Hello Everybody,&lt;/P&gt;&lt;P&gt;I have a table with transactional records, that table has a counter of 1 per transaction by employee and the measure is an average of 0 and 1 from a different column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On my power BI I have a slicer that will filter locations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i am trying to do is to rankx the average column by employee and filter out if the sum of transacions if is less than 30, whenever I do that the Rank will remain the same after I filter out less than 30&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;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;some of the formulas i tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;table[emp_name]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;table[avg_metric]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;table&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;table[avg_metric]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RANKX(ALLSELECTED(slicer_geo), table[avg_metric])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;not all the ranks will be 31 but after I filter out the less than 30 it will hide some their rankings and not generate one for only the selected fields thart met the greater than 30 filter.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any recommendations?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 17:38:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2220357#M52675</guid>
      <dc:creator>johnAest</dc:creator>
      <dc:date>2021-12-03T17:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: RankX Sum of Column and Slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2220901#M52717</link>
      <description>&lt;P&gt;Hi John,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So if I undestrood correctly you want to do a RANKX lsiting of employees whose total amount of transactions is more than 30?&lt;BR /&gt;&lt;BR /&gt;My test data (here the goal is to exclude Patrick and John from the ranking):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;First I placed if condition on the average metric:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Average metric = &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Ranking[Amount of transactions]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;gt;=&lt;/SPAN&gt;&lt;SPAN&gt;30&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Ranking[Average]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;Then I used this to my advantage in the Ranking measure:&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ranking = &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Average metric]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Ranking&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;Ranking&lt;/SPAN&gt;&lt;SPAN&gt;[Average metric]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Excluded from ranking&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;End result:&lt;BR /&gt;&lt;img /&gt;&lt;P&gt;&lt;BR /&gt;Hopefully this helps!&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 04 Dec 2021 12:37:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2220901#M52717</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2021-12-04T12:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: RankX Sum of Column and Slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2223282#M52844</link>
      <description>&lt;P&gt;Thanks for taking your time trying to replicate my situation but on my end it doesnt work, do you think that maybe its the format of the values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far after using the formula of &amp;gt;30 and when I see the average metric in comparison with an average directly from the column the numbers are totally different, what are you using for summarizing the average metric from that dax formula?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ranking is also a problem on my end, doesnt show the ranking as expected, what are you using as summary for that?.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &amp;gt;30 is not removing the employees with less than 30 and I am using the same formula, what else de you think we are missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table you showed it should be the same format that I am using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Average metric is only two values 0 and 1&lt;/P&gt;&lt;P&gt;Counter of transaction is always 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example (Im adding index in the screenshot below just for clarification)&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 16:04:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2223282#M52844</guid>
      <dc:creator>johnAest</dc:creator>
      <dc:date>2021-12-06T16:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: RankX Sum of Column and Slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2223690#M52864</link>
      <description>&lt;P&gt;Hi John,&lt;BR /&gt;&lt;BR /&gt;Thanks for the clarification. I now understand the issue better and was able to replicate it more accurately.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;First my new test data (my formulas use 5 as a transaction treshold instead of 30 but the logic is the same):&lt;BR /&gt;&lt;BR /&gt;&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;Now the DAX that I used previously didn't work directly so I created an aggreated table as to combat this issue:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;temp = &lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Transaction Table2'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Transaction Table2'[Employee]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Average Metric T"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Transaction Table2'[Average metric]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Transactions"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Transaction Table2'[Transaction]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;BR /&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;STRONG&gt;My new measures:&lt;/STRONG&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Average metric 2 = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;temp[Transactions]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;gt;=&lt;/SPAN&gt;&lt;SPAN&gt;5&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;temp[Average Metric T]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Excluded"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Filter Measure = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Average metric 2]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"Excluded"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ranking From aggregated table = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;temp[Transactions]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;gt;=&lt;/SPAN&gt;&lt;SPAN&gt;5&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;allselected&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;temp&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;[Average metric 2]&lt;/SPAN&gt;&lt;SPAN&gt;,,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Dense&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;STRONG&gt;Next step:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;Now I added the filter measure to the visualization to exclude employees with less than 5 transactions.&lt;BR /&gt;&lt;img /&gt;&lt;P&gt;&lt;STRONG&gt;End result:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;I believe these steps will solve the issue.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Dec 2021 19:59:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2223690#M52864</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2021-12-06T19:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: RankX Sum of Column and Slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2223876#M52887</link>
      <description>&lt;P&gt;You solved this issue, you are the best!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just in case in the future sombody comes to this post with the same challenge, in order to create a virtual aggregated table you go to your dashboard, then click modeling and New Table in there you can use the summarize dax formula shared in response and thats it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;really Good job if possible i would give you 1M Kudos !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 22:12:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Sum-of-Column-and-Slicer/m-p/2223876#M52887</guid>
      <dc:creator>johnAest</dc:creator>
      <dc:date>2021-12-06T22:12:06Z</dc:date>
    </item>
  </channel>
</rss>

