<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://spotfirecommunity.tibco.com/community/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>TIBCO Spotfire Clients</title><link>http://spotfirecommunity.tibco.com/community/forums/21.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Re: Weighted average</title><link>http://spotfirecommunity.tibco.com/community/forums/thread/11070.aspx</link><pubDate>Thu, 07 Jun 2012 15:37:55 GMT</pubDate><guid isPermaLink="false">affde357-0bb3-4331-9204-9726b0672618:11070</guid><dc:creator>Ryan Weber</dc:creator><slash:comments>0</slash:comments><comments>http://spotfirecommunity.tibco.com/community/forums/thread/11070.aspx</comments><wfw:commentRss>http://spotfirecommunity.tibco.com/community/forums/commentrss.aspx?SectionID=21&amp;PostID=11070</wfw:commentRss><description>&lt;p&gt;If you want a unique value for&amp;nbsp;groups in a calculated column, you need to use the over statement to provide the scope of the weighted average (i.e. county level, state, country, etc.)&amp;nbsp; Example as follows:&lt;/p&gt;
&lt;p&gt;WeightedAverage([Weight_Column],[Value_Column]) over ([County])&lt;/p&gt;
&lt;p&gt;If you only need to visualize the answer, and not use it in another calculation, you should be able to do it in a bar chart, and then choose rowid as your x-axis selector to expand the weighted average to the entire data set (or choose a grouped column to set a different scope)&lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Ryan&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Weighted average</title><link>http://spotfirecommunity.tibco.com/community/forums/thread/10493.aspx</link><pubDate>Fri, 04 May 2012 21:53:23 GMT</pubDate><guid isPermaLink="false">affde357-0bb3-4331-9204-9726b0672618:10493</guid><dc:creator>larfme</dc:creator><slash:comments>0</slash:comments><comments>http://spotfirecommunity.tibco.com/community/forums/thread/10493.aspx</comments><wfw:commentRss>http://spotfirecommunity.tibco.com/community/forums/commentrss.aspx?SectionID=21&amp;PostID=10493</wfw:commentRss><description>&lt;p&gt;I have a similar issue. I put in the weightedaveragefunction with the two values and it gives me the same value on every line in the data set. &lt;/p&gt;
&lt;p&gt;Here is a simple example of fake numbers showing the issue. When I I place the weightedAvg number in the bar chart I of course get bars of equal length no matter how I divide up the data.&lt;/p&gt;
&lt;p&gt;Row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value1 Value2&amp;nbsp;weightedAvg&lt;br /&gt;Row 1&amp;nbsp; 7.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 53.3&lt;br /&gt;Row 2&amp;nbsp; 6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;53.3&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Weighted average</title><link>http://spotfirecommunity.tibco.com/community/forums/thread/9674.aspx</link><pubDate>Thu, 01 Mar 2012 23:35:21 GMT</pubDate><guid isPermaLink="false">affde357-0bb3-4331-9204-9726b0672618:9674</guid><dc:creator>Christof</dc:creator><slash:comments>0</slash:comments><comments>http://spotfirecommunity.tibco.com/community/forums/thread/9674.aspx</comments><wfw:commentRss>http://spotfirecommunity.tibco.com/community/forums/commentrss.aspx?SectionID=21&amp;PostID=9674</wfw:commentRss><description>&lt;p&gt;Have you tried wrapping it into an avg() ? If it is only one value, it should not change it.&lt;/p&gt;
&lt;p&gt;Christof&lt;/p&gt;</description></item><item><title>Weighted average</title><link>http://spotfirecommunity.tibco.com/community/forums/thread/9581.aspx</link><pubDate>Fri, 24 Feb 2012 09:42:26 GMT</pubDate><guid isPermaLink="false">affde357-0bb3-4331-9204-9726b0672618:9581</guid><dc:creator>JMH</dc:creator><slash:comments>0</slash:comments><comments>http://spotfirecommunity.tibco.com/community/forums/thread/9581.aspx</comments><wfw:commentRss>http://spotfirecommunity.tibco.com/community/forums/commentrss.aspx?SectionID=21&amp;PostID=9581</wfw:commentRss><description>&lt;p&gt;I am trying to calculate a weighted average of a certain parameter, say a material (M) weighted by cost (C).&amp;nbsp; I have used either the &amp;quot;WeightedAverage&amp;quot; function in spotfire and a custom equation to calculated the weighted average.&amp;nbsp; The result of this expression should be a single value.&amp;nbsp; However, when I try to put it on a bar chart or some other visualization, it requires me to provide an aggregation method as if there are multiple values present.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Can someone provide some insight into why Spotfire is doing this?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Joel&lt;/p&gt;</description></item></channel></rss>