<?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 Calculating Percentiles vs. Percentiles using Visual Reference Lines in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Percentiles-vs-Percentiles-using-Visual-Reference/m-p/3489612#M133566</link>
    <description>&lt;P&gt;Hi all!&lt;BR /&gt;I created a column chart displaying customers' sales and added 2 reference lines- average ($5.63 M) and 80th percentile line ($7.91 M).&lt;/P&gt;&lt;P&gt;Now, I wish to calculate the same percentile value using DAX, I'm getting $731.62M!&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;EM&gt;Sales Over 80Percentile = CALCULATE(PERCENTILEX.INC(Sales,SUM(Sales[Gross Sales]),.8), ALL(Customers[Customer_ID]))&lt;/EM&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Could you please guide me on how I can get the same results using DAX??&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 22 Oct 2023 09:14:36 GMT</pubDate>
    <dc:creator>homeshagarwal</dc:creator>
    <dc:date>2023-10-22T09:14:36Z</dc:date>
    <item>
      <title>Calculating Percentiles vs. Percentiles using Visual Reference Lines</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Percentiles-vs-Percentiles-using-Visual-Reference/m-p/3489612#M133566</link>
      <description>&lt;P&gt;Hi all!&lt;BR /&gt;I created a column chart displaying customers' sales and added 2 reference lines- average ($5.63 M) and 80th percentile line ($7.91 M).&lt;/P&gt;&lt;P&gt;Now, I wish to calculate the same percentile value using DAX, I'm getting $731.62M!&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;EM&gt;Sales Over 80Percentile = CALCULATE(PERCENTILEX.INC(Sales,SUM(Sales[Gross Sales]),.8), ALL(Customers[Customer_ID]))&lt;/EM&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Could you please guide me on how I can get the same results using DAX??&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 09:14:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Percentiles-vs-Percentiles-using-Visual-Reference/m-p/3489612#M133566</guid>
      <dc:creator>homeshagarwal</dc:creator>
      <dc:date>2023-10-22T09:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentiles vs. Percentiles using Visual Reference Lines</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Percentiles-vs-Percentiles-using-Visual-Reference/m-p/3490303#M133601</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="579490" data-lia-user-login="homeshagarwal" class="lia-mention lia-mention-user"&gt;homeshagarwal&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One issue with your measure is that SUM ( Sales[Gross Sales] ) needs to be wrapped in CALCULATE (or define a measure and reference that measure instead).&lt;/P&gt;
&lt;P&gt;Also, to replicate the behaviour of the percentile line, we have to use ALLSELECTED and remove blanks to ensure the Customers included in the visual are included.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales Over 80Percentile =
VAR CustomerSales =
    FILTER (
        ADDCOLUMNS (
            ALLSELECTED ( Customers[Customer_ID] ),
            "@Sales", CALCULATE ( SUM ( Sales[Gross Sales] ) )
        ),
        NOT ISBLANK ( [@Sales] )
    )
RETURN
    PERCENTILEX.INC ( CustomerSales, [@Sales], 0.8 )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work for you?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 03:34:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Percentiles-vs-Percentiles-using-Visual-Reference/m-p/3490303#M133601</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2023-10-23T03:34:56Z</dc:date>
    </item>
  </channel>
</rss>

