<?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: Percentile among averages in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentile-among-averages/m-p/3036916#M104007</link>
    <description>&lt;P&gt;Works like a charm. Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For proper documentation, I had to put the GroupBy in a Calculate clause, to add a RemoveFilter (otherwise it always gave the result of the specific chosen country).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 07:24:42 GMT</pubDate>
    <dc:creator>AviramWeiss</dc:creator>
    <dc:date>2023-01-23T07:24:42Z</dc:date>
    <item>
      <title>Percentile among averages</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentile-among-averages/m-p/3036210#M103982</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with such a structure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;City&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Sales&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;NYC&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;LA&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;Chicago&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;UK&lt;/TD&gt;&lt;TD&gt;London&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;UK&lt;/TD&gt;&lt;TD&gt;Manchester&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;TD&gt;Paris&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;TD&gt;Nice&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a dashboard in which the user can choose the country as a page filter.&lt;/P&gt;&lt;P&gt;One of the components in this page is a Dial Gauge, in which I want to show the average sales of this country, and define the target values as 25th and 75th percentiles (sales in that range will be shown in green, above and below in red).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created 2 measures and defined them as the gauge's target values:&lt;/P&gt;&lt;P&gt;25th percentile=PercentileX.EXC('Table',[Sales],0.25)&lt;/P&gt;&lt;P&gt;75th percentile=PercentileX.EXC('Table',[Sales],0.75)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works fine, but I discovered that the&amp;nbsp;&lt;STRONG&gt;average&lt;/STRONG&gt; of all countries is&amp;nbsp;&lt;STRONG&gt;always&lt;/STRONG&gt; in the range of 25th-75th percentiles.&lt;/P&gt;&lt;P&gt;So what I want to do is calculate the average per country, and then redefine my measures to show the 25th/75th percentiles among the averages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above example, it would be something like:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Average sales&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;UK&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then show percentiles of this table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all in advance,&lt;/P&gt;&lt;P&gt;Aviram&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jan 2023 14:42:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentile-among-averages/m-p/3036210#M103982</guid>
      <dc:creator>AviramWeiss</dc:creator>
      <dc:date>2023-01-22T14:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Percentile among averages</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentile-among-averages/m-p/3036288#M103988</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="484976" data-lia-user-login="AviramWeiss" class="lia-mention lia-mention-user"&gt;AviramWeiss&lt;/a&gt;&amp;nbsp;Try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;25th percentile = 
  VAR __Table = GROUPBY('Table',[Country],"Average Sales",AVERAGEX(CURRENTGROUP(),[Sales])
  VAR __Result = PERCENTILEX.EXC(__Table,[Average Sales],0.25)
RETURN
  __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 22 Jan 2023 16:31:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentile-among-averages/m-p/3036288#M103988</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-01-22T16:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Percentile among averages</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentile-among-averages/m-p/3036916#M104007</link>
      <description>&lt;P&gt;Works like a charm. Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For proper documentation, I had to put the GroupBy in a Calculate clause, to add a RemoveFilter (otherwise it always gave the result of the specific chosen country).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 07:24:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentile-among-averages/m-p/3036916#M104007</guid>
      <dc:creator>AviramWeiss</dc:creator>
      <dc:date>2023-01-23T07:24:42Z</dc:date>
    </item>
  </channel>
</rss>

