Calculating Median
Robert Edis
robeconsult@sbcglobal.net
Wed, 28 Jul 2004 16:11:17 -0700 (PDT)
--0-1114424595-1091056277=:20271
Content-Type: text/plain; charset=us-ascii
No, no, no ... I'm innocent I tell you!
Ordinarily I would agree but in this particular case I suggest Quick because of simplicity. Exception-to-the-rule and all that.
Of couse I could of suggested using a 3GL tool - an external function if you like. :)
Blue
David Morrison - Corporate <dmorrison@mcbrideelectric.com> wrote:
Blue,
Ah, you’re just trying to start trouble on the list-serve aren’t you! Didn’t we just have a discussion about why not to use QUICK when QTP or QUIZ will do (and I was on the side of the QUICK solution)?
Cordially,
David Morrison
McBride Electric
-----Original Message-----
From: powerh-l-admin@lists.sowder.com [mailto:powerh-l-admin@lists.sowder.com]On Behalf Of Robert Edis
Sent: Wednesday, July 28, 2004 1:48 PM
To: PowerHouse List
Subject: RE: Calculating Median
Why do it in Quick? Then you have looping, designer files, and temporary variables available for the logic. No subfile is required and all processing can be done in designer procedures.
Added bonus is that user can run screen and get median value any time they choose without MIS getting involved.
Blue
David Morrison - Corporate <dmorrison@mcbrideelectric.com> wrote:
Blair,
How about something like this:
Use a QTP program that does the following:
1. First request: Sort the data on the value that you're looking to get the median for. Output records to a sub-file at that value, outputting the value and COUNT RESET. Put COUNT NORESET into a global temporary item.
2. Second request: Read the sub-file created in the previous step (they're already sorted). Accumulate the total of the counted field in each record. Compare that to the global temporary; when it reaches 1/2 of that total, you have the median value.
David Morrison
McBride Electric
-----Original Message-----
From: powerh-l-admin@lists.sowder.com [mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Blair Combs
Sent: Wednesday, July 28, 2004 12:23 PM
To: Powerhouse Listserv
Subject: Calculating Median
Does anyone ha! ve an idea on how to calculate the Median for a list of
numbers using Quiz?
Blair Combs
Idaho State University
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe
" in message body to powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe
" in message body to powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
--0-1114424595-1091056277=:20271
Content-Type: text/html; charset=us-ascii
<DIV>No, no, no ... I'm innocent I tell you!</DIV>
<DIV> </DIV>
<DIV>Ordinarily I would agree but in this particular case I suggest Quick because of simplicity. Exception-to-the-rule and all that.</DIV>
<DIV> </DIV>
<DIV>Of couse I could of suggested using a 3GL tool - an external function if you like. :)</DIV>
<DIV> </DIV>
<DIV>Blue<BR><BR><B><I>David Morrison - Corporate <dmorrison@mcbrideelectric.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<META content=Word.Document name=ProgId>
<META content="Microsoft Word 9" name=Generator>
<META content="Microsoft Word 9" name=Originator><LINK href="cid:filelist.xml@01C474B6.5AE0D350" rel=File-List>
<STYLE>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.EmailStyle15
{mso-style-type:personal-reply;
mso-ansi-font-size:10.0pt;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</STYLE>
<DIV class=Section1>
<P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Blue,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Ah, you’re just trying to start trouble on the list-serve aren’t you!<SPAN style="mso-spacerun: yes"> </SPAN>Didn’t we just have a discussion about why not to use QUICK when QTP or QUIZ will do (and I was on the side of the QUICK solution)?<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Cordially,<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoAutoSig><FONT color=navy><SPAN style="COLOR: navy">David Morrison</SPAN></FONT><FONT color=navy><SPAN style="COLOR: navy; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoAutoSig><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy">McBride Electric</SPAN></FONT><FONT color=navy><SPAN style="COLOR: navy; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Tahoma color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">-----Original Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> powerh-l-admin@lists.sowder.com [mailto:powerh-l-admin@lists.sowder.com]<B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Robert Edis<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, July 28, 2004 1:48 PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> PowerHouse List<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: Calculating Median</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=black size=3><SPAN style="FONT-SIZE: 12pt; COLOR: black">Why do it in Quick? Then you have looping, designer files, and temporary variables available for the logic. No subfile is required and all processing can be done in designer procedures. </SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=black size=3><SPAN style="FONT-SIZE: 12pt; COLOR: black"> </SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=black size=3><SPAN style="FONT-SIZE: 12pt; COLOR: black">Added bonus is that user can run screen and get median value any time they choose without MIS getting involved.</SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=black size=3><SPAN style="FONT-SIZE: 12pt; COLOR: black"> </SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=black size=3><SPAN style="FONT-SIZE: 12pt; COLOR: black">Blue<BR><BR><B><I><SPAN style="FONT-WEIGHT: bold; FONT-STYLE: italic">David Morrison - Corporate <dmorrison@mcbrideelectric.com></SPAN></I></B> wrote:</SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: #1010ff 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN-LEFT: 39.75pt; BORDER-LEFT: medium none; MARGIN-RIGHT: 0.5in; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-border-left-alt: solid #1010FF 1.5pt; mso-padding-alt: 0in 0in 0in 4.0pt"><FONT face="Times New Roman" color=black size=3><SPAN style="FONT-SIZE: 12pt; COLOR: black">Blair,<BR><BR>How about something like this:<BR><BR>Use a QTP program that does the following:<BR><BR>1. First request: Sort the data on the value that you're looking to get the median for. Output records to a sub-file at that value, outputting the value and COUNT RESET. Put COUNT NORESET into a global temporary item. <BR><BR>2. Second request: Read the sub-file created in the previous step (they're already sorted). Accumulate the total of the counted field in each record. Compare that to the global temporary; when
it reaches 1/2 of that total, you have the median value. <BR><BR><BR>David Morrison<BR>McBride Electric<BR><BR>-----Original Message-----<BR>From: powerh-l-admin@lists.sowder.com [mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Blair Combs<BR>Sent: Wednesday, July 28, 2004 12:23 PM<BR>To: Powerhouse Listserv<BR>Subject: Calculating Median<BR><BR>Does anyone ha! ve an idea on how to calculate the Median for a list of <BR>numbers using Quiz?<BR><BR>Blair Combs<BR>Idaho State University<BR><BR>= = = = = = = = = = = = = = = = = = = = = = = = = = = =<BR>Mailing list: powerh-l@lists.sowder.com<BR>Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com<BR>Unsubscribe: "unsubscribe <PASSWORD>" in message body to powerh-l-request@lists.sowder.com<BR>http://lists.sowder.com/mailman/listinfo/powerh-l<BR>This list is closed, thus to post to the list you must be a subscriber.<BR><BR><BR><BR>= = = = = = = = = = = = = = = = = = = = = = = = = = = =<BR>Mailing list:
powerh-l@lists.sowder.com<BR>Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com<BR>Unsubscribe: "unsubscribe <PASSWORD>" in message body to powerh-l-request@lists.sowder.com<BR>http://lists.sowder.com/mailman/listinfo/powerh-l<BR>This list is closed, thus to post to the list you must be a subscriber.</SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P></DIV></DIV></BLOCKQUOTE>
--0-1114424595-1091056277=:20271--