Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Average aggregator

Received: by 10.68.227.230 with SMTP id sd6mr16367898pbc.8.1333001472764;
        Wed, 28 Mar 2012 23:11:12 -0700 (PDT)
X-BeenThere: cascading-user@googlegroups.com
Received: by 10.68.237.40 with SMTP id uz8ls2299753pbc.2.gmail; Wed, 28 Mar
 2012 23:11:12 -0700 (PDT)
Received: by 10.68.212.74 with SMTP id ni10mr181297pbc.17.1333001472268;
        Wed, 28 Mar 2012 23:11:12 -0700 (PDT)
Date: Wed, 28 Mar 2012 23:11:11 -0700 (PDT)
From: Kavitha Raghavachar <kavitha.raghavac...@cbsinteractive.com>
To: cascading-user@googlegroups.com
Message-ID: <29285294.1213.1333001471633.JavaMail.geo-discussion-forums@pbnt10>
In-Reply-To: <55B05A90-1F03-41BF-A6DC-435EE6C13B56@wensel.net>
References: <20568958.1053.1332987520133.JavaMail.geo-discussion-forums@pbnt10>
 <55B05A90-1F03-41BF-A6DC-435EE6C13B56@wensel.net>
Subject: Re: Average aggregator
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1211_32991037.1333001471631"

------=_Part_1211_32991037.1333001471631
Content-Type: multipart/alternative; 
	boundary="----=_Part_1212_26929738.1333001471632"

------=_Part_1212_26929738.1333001471632
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit


Hi Chris,
leadsPipe = new GroupBy(leadsPipe, 
LEADSS1.append(LEADSS7).append(LEADSS30).append(PAGESS1).append(PAGESS7).append(PAGESS30));
        leadsPipe = new Every(leadsPipe, LEADSS1, new Average(LEADSS1_AVG));

Now the problem is this.

The actual average of all the rows for Field LEADSS1 is   0.061538462 
(According to calculation in Excel)

I am getting 0.0 which is rounded to 1 decimal.
How can I format it to show me at least 5 decimals?

Thanks,
Kavitha
 
On Wednesday, March 28, 2012 10:04:36 PM UTC-7, Chris K Wensel wrote:
>
> can we see more code leading up to the Average?
>
> ckw
>
> On Mar 28, 2012, at 7:18 PM, Kavitha Raghavachar wrote:
>
> Hi,
> I have 200 rows feed and on a particular Field, I want to take an Average. 
> I tried 
>
> leadsPipe = new Every(leadsPipe, LEADSS1, new Average(LEADSS1_AVG));
>
> where LEADSS1 is a field I want to take average on and LEADSS1_AVG is a 
> new field where my average computed value will be held.
>
> The above code gives me the Sum of that field. (I verified it by copying 
> the feed to Excel and taking an average on a column)
>
> Please help.
> Thanks,
> Kavitha
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "cascading-user" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/cascading-user/-/Jd6YNL3VKX0J.
> To post to this group, send email to cascading-user@googlegroups.com.
> To unsubscribe from this group, send email to 
> cascading-user+unsubscribe@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/cascading-user?hl=en.
>
>
> --
> Chris K Wensel
> ch...@concurrentinc.com
> http://concurrentinc.com
>  
>
------=_Part_1212_26929738.1333001471632
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<br>Hi Chris,<br>leadsPipe =3D new GroupBy(leadsPipe, LEADSS1.append(LEADSS=
7).append(LEADSS30).append(PAGESS1).append(PAGESS7).append(PAGESS30));<br>&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; leadsPipe =3D new Every(leadsPipe=
, LEADSS1, new Average(LEADSS1_AVG));<br><br>Now the problem is this.<br><b=
r>The actual average of all the rows for Field LEADSS1 is=20






<style>
<!--table
=09{mso-displayed-decimal-separator:"\.";
=09mso-displayed-thousand-separator:"\,";}
td
=09{padding-top:1px;
=09padding-right:1px;
=09padding-left:1px;
=09mso-ignore:padding;
=09color:windowtext;
=09font-size:10.0pt;
=09font-weight:400;
=09font-style:normal;
=09text-decoration:none;
=09font-family:Verdana;
=09mso-generic-font-family:auto;
=09mso-font-charset:0;
=09mso-number-format:General;
=09text-align:general;
=09vertical-align:bottom;
=09border:none;
=09mso-background-source:auto;
=09mso-pattern:auto;
=09mso-protection:locked visible;
=09white-space:nowrap;
=09mso-rotate:0;}
ruby
=09{ruby-align:left;}
rt
=09{color:windowtext;
=09font-size:8.0pt;
=09font-weight:400;
=09font-style:normal;
=09text-decoration:none;
=09font-family:Verdana;
=09mso-generic-font-family:auto;
=09mso-font-charset:0;
=09mso-char-type:none;
=09display:none;}
-->
</style>


<table style=3D"border-collapse:
 collapse" border=3D"0" cellpadding=3D"0" cellspacing=3D"0" width=3D"75">
 <colgroup><col width=3D"75">
 </colgroup><tbody><tr height=3D"13">

  <td align=3D"right" height=3D"13" width=3D"75">0.061538462 (According to =
calculation in Excel)<br><br>I am getting 0.0 which is rounded to 1 decimal=
.<br>How can I format it to show me at least 5 decimals?<br><br>Thanks,<br>=
Kavitha<br></td>

 </tr>
</tbody></table>

<br>On Wednesday, March 28, 2012 10:04:36 PM UTC-7, Chris K Wensel wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;"><div style=3D"word-wrap:break-wo=
rd"><div>can we see more code leading up to the Average?</div><div><br></di=
v><div>ckw</div><br><div><div>On Mar 28, 2012, at 7:18 PM, Kavitha Raghavac=
har wrote:</div><br><blockquote type=3D"cite">Hi,<br>I have 200 rows feed a=
nd on a particular Field, I want to take an Average. I tried <br><br>leadsP=
ipe =3D new Every(leadsPipe, LEADSS1, new Average(LEADSS1_AVG));<br><br>whe=
re LEADSS1 is a field I want to take average on and LEADSS1_AVG is a new fi=
eld where my average computed value will be held.<br><br>The above code giv=
es me the Sum of that field. (I verified it by copying the feed to Excel an=
d taking an average on a column)<br><br>Please help.<br>Thanks,<br>Kavitha<=
br><br><div><br></div>

-- <br>
You received this message because you are subscribed to the Google Groups "=
cascading-user" group.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msg/cascading-user/-/Jd6YNL3VKX0J" target=3D"_blank">https://groups.go=
ogle.com/d/<wbr>msg/cascading-user/-/<wbr>Jd6YNL3VKX0J</a>.<br>=20
To post to this group, send email to <a href=3D"mailto:cascading-user@googl=
egroups.com" target=3D"_blank">cascading-user@googlegroups.<wbr>com</a>.<br=
>
To unsubscribe from this group, send email to <a href=3D"mailto:cascading-u=
ser+unsubscribe@googlegroups.com" target=3D"_blank">cascading-user+unsubscr=
ibe@<wbr>googlegroups.com</a>.<br>

For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/cascading-user?hl=3Den" target=3D"_blank">http://groups.google.com/<wb=
r>group/cascading-user?hl=3Den</a>.<br>


</blockquote></div><br><div>
<span style=3D"border-collapse:separate;color:rgb(0,0,0);font-family:Helvet=
ica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing=
:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tra=
nsform:none;white-space:normal;word-spacing:0px;font-size:medium"><span sty=
le=3D"border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-=
style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;l=
ine-height:normal;text-indent:0px;text-transform:none;white-space:normal;wo=
rd-spacing:0px;font-size:medium"><div style=3D"word-wrap:break-word"><span =
style=3D"border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;fo=
nt-style:normal;font-variant:normal;font-weight:normal;letter-spacing:norma=
l;line-height:normal;text-indent:0px;text-transform:none;white-space:normal=
;word-spacing:0px;font-size:medium"><div style=3D"word-wrap:break-word"><sp=
an style=3D"border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica=
;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:no=
rmal;line-height:normal;text-indent:0px;text-transform:none;white-space:nor=
mal;word-spacing:0px;font-size:medium"><div style=3D"word-wrap:break-word">=
<span style=3D"border-collapse:separate;color:rgb(0,0,0);font-family:Helvet=
ica;font-size:medium;font-style:normal;font-variant:normal;font-weight:norm=
al;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:=
none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:break-wor=
d"><span style=3D"border-collapse:separate;color:rgb(0,0,0);font-family:Hel=
vetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:n=
ormal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transfo=
rm:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:break-=
word"><span style=3D"border-collapse:separate;color:rgb(0,0,0);font-family:=
Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:=
normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transf=
orm:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:break=
-word"><span style=3D"border-collapse:separate;color:rgb(0,0,0);font-family=
:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight=
:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:brea=
k-word"><span style=3D"border-collapse:separate;color:rgb(0,0,0);font-famil=
y:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weigh=
t:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word"><div><div style=3D"word-wrap:break-word"><div style=3D"word-wrap:b=
reak-word"><div style=3D"word-wrap:break-word"><div style=3D"word-wrap:brea=
k-word"><div style=3D"word-wrap:break-word"><div>--</div><div>Chris K Wense=
l</div><div><a href=3D"mailto:ch...@concurrentinc.com" target=3D"_blank">ch=
r...@concurrentinc.com</a></div><div><a href=3D"http://concurrentinc.com" ta=
rget=3D"_blank">http://concurrentinc.com</a></div></div></div></div></div><=
/div></div></div></span></div></span></div></span></div></span></div></span=
></div></span></div></span></div></span></span>
</div>
<br></div></blockquote>
------=_Part_1212_26929738.1333001471632--

------=_Part_1211_32991037.1333001471631--