<?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: Using Query builder to create percentile stats in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60593#M6141</link>
    <description>I've always used the Summary Statistics task to do percentiles. I'm not 100% sure that the query builder can even do percentiles... but I'm happy to be proven wrong. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Sun, 21 Feb 2010 03:12:53 GMT</pubDate>
    <dc:creator>RichardH_sas</dc:creator>
    <dc:date>2010-02-21T03:12:53Z</dc:date>
    <item>
      <title>Using Query builder to create percentile stats</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60592#M6140</link>
      <description>I have a simple table of two columns: Week and Value (numeric, continuous).  Ultimately I want to plot the 99.8th percentile of the Value by Workweek.  Using the Query Builder on the table, I tried using PCTL function: (PCTL(99.8,Value).  However, it will not support grouping for this function in the interface.  I have also tried doing this manually:&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
   CREATE TABLE SASUSER.temp1 AS &lt;BR /&gt;
   SELECT t1.Week, &lt;BR /&gt;
            (PCTL(99.8,t1.'OQM-FT1 Hrs'n)) FORMAT=BEST7.2 AS '99.8th percentile'n&lt;BR /&gt;
      FROM SASUSER.Table t1&lt;BR /&gt;
      GROUP BY t1.Week;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
I get the Warning in the log:&lt;BR /&gt;
"WARNING: A GROUP BY clause has been transformed into an ORDER BY clause because neither the SELECT clause nor the optional HAVING clause of the associated table-expression referenced a summary function."&lt;BR /&gt;
&lt;BR /&gt;
So this just returns the Value, instead of the 99.8th percentile of the Value by Week.&lt;BR /&gt;
&lt;BR /&gt;
Any ideas??&lt;BR /&gt;
&lt;BR /&gt;
Cheers!&lt;BR /&gt;
Chadd</description>
      <pubDate>Fri, 19 Feb 2010 22:48:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60592#M6140</guid>
      <dc:creator>TheChadd</dc:creator>
      <dc:date>2010-02-19T22:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query builder to create percentile stats</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60593#M6141</link>
      <description>I've always used the Summary Statistics task to do percentiles. I'm not 100% sure that the query builder can even do percentiles... but I'm happy to be proven wrong. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Sun, 21 Feb 2010 03:12:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60593#M6141</guid>
      <dc:creator>RichardH_sas</dc:creator>
      <dc:date>2010-02-21T03:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query builder to create percentile stats</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60594#M6142</link>
      <description>I've not been able to get PCTL() to work in PROC SQL.  It seems to require multiple arguments to work correctly.  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
.....Phil</description>
      <pubDate>Mon, 22 Feb 2010 11:56:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60594#M6142</guid>
      <dc:creator>prholland</dc:creator>
      <dc:date>2010-02-22T11:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query builder to create percentile stats</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60595#M6143</link>
      <description>I just want a data table with the 99.8th percentile by week to show up on my process flow.  Can Summay Stats do that?  When I played around with it, it would output the summary table graphically, but not as a usable table in my process flow.</description>
      <pubDate>Mon, 22 Feb 2010 15:51:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60595#M6143</guid>
      <dc:creator>TheChadd</dc:creator>
      <dc:date>2010-02-22T15:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query builder to create percentile stats</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60596#M6144</link>
      <description>You should be able to save the results data from Summary Stats in a SAS data set, which you'll be able to use elsewhere.&lt;BR /&gt;
&lt;BR /&gt;
........Phil</description>
      <pubDate>Mon, 22 Feb 2010 16:12:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60596#M6144</guid>
      <dc:creator>prholland</dc:creator>
      <dc:date>2010-02-22T16:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query builder to create percentile stats</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60597#M6145</link>
      <description>I'll give it a shot and let you know how I do :).&lt;BR /&gt;
&lt;BR /&gt;
Cheers!</description>
      <pubDate>Mon, 22 Feb 2010 16:16:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60597#M6145</guid>
      <dc:creator>TheChadd</dc:creator>
      <dc:date>2010-02-22T16:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query builder to create percentile stats</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60598#M6146</link>
      <description>Well how about that.  Neither Summary Statistics nor Summary Tables let me define a percentile.  Am I missing something here?</description>
      <pubDate>Mon, 22 Feb 2010 20:12:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60598#M6146</guid>
      <dc:creator>TheChadd</dc:creator>
      <dc:date>2010-02-22T20:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query builder to create percentile stats</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60599#M6147</link>
      <description>You can get 99.8% percentiles from the Tables &amp;gt; "Basic confidence intervals" in Distribution Analysis (PROC UNIVARIATE).  You can then "Save output statistics to a data set".&lt;BR /&gt;
&lt;BR /&gt;
.........Phil</description>
      <pubDate>Mon, 22 Feb 2010 20:57:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60599#M6147</guid>
      <dc:creator>prholland</dc:creator>
      <dc:date>2010-02-22T20:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query builder to create percentile stats</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60600#M6148</link>
      <description>Looks like it only spits out the 99.8 LCL and UCL for the mean.  I gave up and just coded in a proc univariate and merged it with the other output table.&lt;BR /&gt;
proc univariate data=sasuser.table noprint;&lt;BR /&gt;
var Values;&lt;BR /&gt;
by Week;&lt;BR /&gt;
output out=pctl pctlpts=99.8 pctlpre=Values;&lt;BR /&gt;
&lt;BR /&gt;
If I have to manually code any more items in this project, I'll probably drop EG altogether and use plain 'ol SAS.</description>
      <pubDate>Mon, 22 Feb 2010 21:11:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-builder-to-create-percentile-stats/m-p/60600#M6148</guid>
      <dc:creator>TheChadd</dc:creator>
      <dc:date>2010-02-22T21:11:53Z</dc:date>
    </item>
  </channel>
</rss>

