Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Crosstab Taking an Average of Averages
spaddock
<p>I'm trying to create a survey report which needs to take an average of a group of average scores. The problem is BIRT is calculating the overall average using all of the underlying data instead of taking the average of the 3 already computed averages, is there any way to avoid this?</p>
<p> </p>
<p>As an example, a group of questions could be:</p>
<p> </p>
<p>Scale 1-100</p>
<p> </p>
<p>How did you like these things about your school:</p>
<p> Teacher - 81.9</p>
<p> Library - 92.9</p>
<p> Playground - 99.3</p>
<p> </p>
<p>I want the overall score to be 91.37</p>
<p>(81.9 + 92.9 + 99.3) / 3</p>
<p> </p>
<p>But I'm getting a slightly lower number like 91.25 because BIRT isn't taking the average of the 3 averaged numbers but the average of all the scores in the group.</p>
<p> </p>
<p>I hope I have explained this well enough.</p>
<p> </p>
<p> </p>
<p>Kindest regards,</p>
<p>Shayne</p>
<p> </p>
Find more posts tagged with
Comments
micajblock
<p>What version of BIRT are you using?</p>
spaddock
<p>We are using BIRT 4.3.2 v2</p>
<p> </p>
<p>-Shayne</p>
micajblock
<p>Average is a derived measure. Create a SUM measure and a COUNT measure. The the Average should be a derived measure by dividing the SUM by the COUNT.</p>
<p> </p>
spaddock
<p>I had already created a derived measure. My issue is that with the totals for the group I want it to be an average of the computed derived averages. Instead it seems to be taking a total average of all the underlying data that made up those averages which is leading to precision issues of a couple of decimal points.</p>
<p> </p>
<p>Instead of taking the three average scores and dividing by three it seems to be taking a sum and count for all the raw data that make up the group and dividing by that. Which is strange since I would have thought the cube would have aggregated everything already, makes me think that those totals go back to the dataset that made up the cube.</p>
<p> </p>
<p>Let me know if I'm not being clear enough, I'm trying to explain the scenario the best I can.</p>
<p> </p>
<p>-Shayne</p>
micajblock
<p>Unfortunately that is not how it works. Average by nature is a derived measure. A derived measure is not stored in the cube but calculated at run-time.For example in the attached report I am displaying the average of the product lines. The average of the average is 82,085.46, however the real average of the sales is 88,111.84. To my knowledge in a cross-tab there is no way to do an average of an average (which is what you are asking for). It is possible in a table though (also see attached report).</p>
<p> </p>
<p>Let me know if this makes things clearer. </p>