title: Percentile calculation in powerbi using summarize() and groupby()
body: <p>I m trying to findout 95th percentile for blackout by grouping the data by its OrgName, I got the output by using below query in PowerBI </p>
  
  <pre><code>X= SUMMARIZE(Query1,Query1[OrgName],"Percentile",PERCENTILE.INC(Query1[Blackout],0.95))
  </code></pre>
  
  <p>output of it only 60 % right, there is some deviation from the expected result.
  so I m trying to use <code>groupby()</code> instead of <code>summarize ()</code>,  Below is my dax custom table function-</p>
  
  <pre><code>Org_GroupBy = GROUPBY(Query1,Query1[OrgName],"OrgName",PERCENTILEX.INC(CURRENTGROUP(),Query1[Blackout],0.95))
  </code></pre>
  
  <p>Below is the error I m getting</p>
  
  <blockquote>
    <p>Function 'GROUPBY' scalar expressions have to be Aggregation functions over CurrentGroup(). The expression of each Aggregation has to be either a constant or directly reference the columns in CurrentGroup().</p>
  </blockquote>