<?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 with filter / conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PERCENTILE-with-filter-conditions/m-p/2339170#M58982</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281539" data-lia-user-login="DataMark" class="lia-mention lia-mention-user"&gt;DataMark&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DOG Sales = IF([Category]="DOG",[Sales])&lt;/LI-CODE&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = PERCENTILE.INC([DOG Sales],0.25)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Feb 2022 09:26:31 GMT</pubDate>
    <dc:creator>v-zhangti</dc:creator>
    <dc:date>2022-02-15T09:26:31Z</dc:date>
    <item>
      <title>PERCENTILE with filter / conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PERCENTILE-with-filter-conditions/m-p/2334944#M58773</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a question about using percentiles (PERCENTILE.EXC or PERCENTILE.INC) with a filter / conditions. Suppose I have two tables, one with all sales for all items and another with sales for new produts. What I am trying to find is the 1st quartile / 25% of all sales based on the category the new product is classified in as a benchmark for success / failure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example below, I would want to return the 1st quartile for DOG. In Excel, the formula would be something like:&lt;/P&gt;&lt;P&gt;=PERCENTILE.INC(IF([Category]="DOG",[Sales]),0.25). I tried using FILTER in DAX, but can't seem to get the result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 1:&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DOG&lt;/TD&gt;&lt;TD&gt;19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CAT&lt;/TD&gt;&lt;TD&gt;17&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DOG&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DOG&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CAT&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DOG&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CAT&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DOG&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CAT&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DOG&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CAT&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 2:&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Sales&lt;/TD&gt;&lt;TD&gt;1st Quartile&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Delicious Dog Food&lt;/TD&gt;&lt;TD&gt;DOG&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;6.5&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 12 Feb 2022 21:50:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PERCENTILE-with-filter-conditions/m-p/2334944#M58773</guid>
      <dc:creator>DataMark</dc:creator>
      <dc:date>2022-02-12T21:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: PERCENTILE with filter / conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PERCENTILE-with-filter-conditions/m-p/2335036#M58775</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281539" data-lia-user-login="DataMark" class="lia-mention lia-mention-user"&gt;DataMark&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are two functions that can probably help you.&amp;nbsp; &lt;A href="https://docs.microsoft.com/en-us/dax/percentile-inc-function-dax" target="_self"&gt;PERCENTILE.INC&lt;/A&gt; and &lt;A href="https://docs.microsoft.com/en-us/dax/percentilex-inc-function-dax" target="_self"&gt;PERCENTILEX.INC&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The formula should be this simple.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;PERCENTILE.INC(
	Table[Sales],
	.25
)&lt;/LI-CODE&gt;
&lt;P&gt;Shouldn't need to filter the formula because filter context in the visualization should take care of that for you (meaning it will automatically filter for Category DOG and Product Delicious Dog Food).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 01:07:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PERCENTILE-with-filter-conditions/m-p/2335036#M58775</guid>
      <dc:creator>littlemojopuppy</dc:creator>
      <dc:date>2022-02-13T01:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: PERCENTILE with filter / conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PERCENTILE-with-filter-conditions/m-p/2335461#M58820</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to filter the formula for 2 reasons: 1) a measure for success needs to be calculated. This will look like =IF(Sales &amp;gt; Category Percentile, SUCCESS, FAILURE) and 2) Need to do the same exercise but for other product attributes, like MARKET, PRICE CLASSIFICATION (low, medium, high) and so on&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 21:58:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PERCENTILE-with-filter-conditions/m-p/2335461#M58820</guid>
      <dc:creator>DataMark</dc:creator>
      <dc:date>2022-02-13T21:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: PERCENTILE with filter / conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PERCENTILE-with-filter-conditions/m-p/2339170#M58982</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281539" data-lia-user-login="DataMark" class="lia-mention lia-mention-user"&gt;DataMark&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DOG Sales = IF([Category]="DOG",[Sales])&lt;/LI-CODE&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = PERCENTILE.INC([DOG Sales],0.25)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 09:26:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PERCENTILE-with-filter-conditions/m-p/2339170#M58982</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2022-02-15T09:26:31Z</dc:date>
    </item>
  </channel>
</rss>

