<?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 DAX for highlighting TopN values in a drilled down bar chart in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1597120#M32002</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to visualize data that is drilled down to hours per days in a bar chart. I want to visualize the topN maximum values of this bar chart. I have a date table storing the dates and days and I have a timetable that stores the hours. These tables are linked through my main data table. The DAX formula I tried to calculate the topN is as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TestTop = 
VAR SelectedTop = 3
RETURN
SWITCH(TRUE(),
    SelectedTop = 0, [Utilization],
    RANKX ( 
            CROSSJOIN(DISTINCT(DateTable[Day]), DISTINCT(TimeTable15min[Hour])), 
            [Utilization],
                )
                  &amp;lt;= SelectedTop,
        [Utilization]
)&lt;/LI-CODE&gt;&lt;P&gt;As you see in the figure below, all the bars are highlighted. I feel the RANKX is applied to every bin of the bar chart separately. Therefore, all the bins are highlighted.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jan 2021 12:37:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-01-13T12:37:20Z</dc:date>
    <item>
      <title>DAX for highlighting TopN values in a drilled down bar chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1597120#M32002</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to visualize data that is drilled down to hours per days in a bar chart. I want to visualize the topN maximum values of this bar chart. I have a date table storing the dates and days and I have a timetable that stores the hours. These tables are linked through my main data table. The DAX formula I tried to calculate the topN is as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TestTop = 
VAR SelectedTop = 3
RETURN
SWITCH(TRUE(),
    SelectedTop = 0, [Utilization],
    RANKX ( 
            CROSSJOIN(DISTINCT(DateTable[Day]), DISTINCT(TimeTable15min[Hour])), 
            [Utilization],
                )
                  &amp;lt;= SelectedTop,
        [Utilization]
)&lt;/LI-CODE&gt;&lt;P&gt;As you see in the figure below, all the bars are highlighted. I feel the RANKX is applied to every bin of the bar chart separately. Therefore, all the bins are highlighted.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 12:37:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1597120#M32002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-13T12:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for highlighting TopN values in a drilled down bar chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1599663#M32069</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp; -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you create the crossjoin inside your measure, each DISTINCT works in the current filter context, which in your case is a specific DOW and time bucket. Try using ALL around the date tables and that should expand the context to your entire dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DAX also has a TOPN function if that might be easier. Details here:&amp;nbsp;&lt;A href="https://dax.guide/topn/" target="_self"&gt;https://dax.guide/topn/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this doesn't help, please provide data in a format that can be copy/pasted and the code for [Utilization], or share a link to your PBIX file with sensitive data removed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 13:32:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1599663#M32069</guid>
      <dc:creator>dedelman_clng</dc:creator>
      <dc:date>2021-01-14T13:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for highlighting TopN values in a drilled down bar chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1601418#M32119</link>
      <description>&lt;P&gt;Hi David,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response. Unfortunately, I have not been able to fix the issue the way you described it. Could you take a look at my PBIX file? Here is the link:&amp;nbsp;&lt;A href="https://app.powerbi.com/groups/me/reports/f13a3b88-da7a-49a0-8e41-c28f480c53ba?ctid=76a2ae5a-9f00-4f6b-95ed-5d33d77c4d61" target="_blank"&gt;https://app.powerbi.com/groups/me/reports/f13a3b88-da7a-49a0-8e41-c28f480c53ba?ctid=76a2ae5a-9f00-4f6b-95ed-5d33d77c4d61&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 07:53:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1601418#M32119</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-15T07:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for highlighting TopN values in a drilled down bar chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1602027#M32132</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt; - the link you provided doesn't work. I will need the pbix (Power BI Desktop) file, not the report published in the Power BI service.&amp;nbsp; People usually use Dropbox or Google Drive or OneDrive to provide a copy of the file.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 12:17:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1602027#M32132</guid>
      <dc:creator>dedelman_clng</dc:creator>
      <dc:date>2021-01-15T12:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for highlighting TopN values in a drilled down bar chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1602038#M32133</link>
      <description>&lt;P&gt;Ah, I see. Here is a Dropbox link:&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 12:41:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1602038#M32133</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-21T12:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for highlighting TopN values in a drilled down bar chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1611128#M32372</link>
      <description>&lt;P&gt;HI&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp; - sorry, I have not been able to make any headway on your issue. I'm going to reach out and see if others can help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="12123" data-lia-user-login="vanessafvg" class="lia-mention lia-mention-user"&gt;vanessafvg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24542" data-lia-user-login="PaulDBrown" class="lia-mention lia-mention-user"&gt;PaulDBrown&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 11:27:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1611128#M32372</guid>
      <dc:creator>dedelman_clng</dc:creator>
      <dc:date>2021-01-20T11:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for highlighting TopN values in a drilled down bar chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1613005#M32438</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 04:12:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1613005#M32438</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2021-01-21T04:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for highlighting TopN values in a drilled down bar chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1613425#M32458</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much! It is a great step in the right direction, but not the result I really wanted. Here is a more clear example of what I want to see with a top 3.&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;Would the current solution be easily adjustable to get this result?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 08:11:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1613425#M32458</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-21T08:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for highlighting TopN values in a drilled down bar chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1613538#M32465</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 08:35:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1613538#M32465</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2021-01-21T08:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for highlighting TopN values in a drilled down bar chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1613675#M32468</link>
      <description>&lt;P&gt;Wow, you are amazing. Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 09:11:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-highlighting-TopN-values-in-a-drilled-down-bar-chart/m-p/1613675#M32468</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-21T09:11:54Z</dc:date>
    </item>
  </channel>
</rss>

