aggregate-functions


SAP BO XI Desktop Intelligence Aggregate Calculations


I am new to Business Objects and more specifically Desktop Intelligence. We are trying to use it as a reporting tool for our scientific data but running into issues when performing calculations to "create" objects and then trying to perform statistical or aggregate functions on them. For example I run a query that pulls the columns subject name, result day, parameter, and result value. In a table it would look like this:
SUBJECT DAY PARAM RV
10001 0 Length 5.32
10001 0 Width 4.68
10002 0 Length 3.98
10002 0 Width 1.64
10001 7 Length 8.89
10001 7 Width 7.30
10002 7 Length 4.17
10002 7 Width 2.19
We then use the equation for Volume: L*W^2*0.52 in the report defined as measure variable. Using a cross tab with days across the top and subjects down the side I display Length Width and Tumor Volume like such:
0 7
SUBJECT L W V L W V
10001 5.32 4.68 60.59 8.89 7.30 246.35
10002 3.98 1.64 5.57 4.17 2.19 10.40
COUNT # #
MEAN # #
Within the footers I'd like to display aggregates such as count, standard deviation, percent change from day zero but they are all screwed up. It's not that it's also doubling the n by two either to account for the fact that Length and Width make up Volume. I have no clue and am at a loss. Any advice suggestions or guidance would be welcomed.
Thanks in advance,
Jeff
I assume that your cross tab looks like the following in Slice and Dice:
¦ <DAY> (Break)
¦ <PARAM>
--------------------
<SUBJECT> ¦ <RV>
So your table should look something like:
0 7
Length Width Volume Length Width Volume
10001 5.32 4.68 60.59 8.89 7.30 246.35
10002 3.98 1.64 5.57 4.17 2.19 10.40
With <DAY>'s break footer having the volume variable.
For your volume calculation I've used the formula: =(<RV> Where (<PARAM>="Length"))*(Power(<RV> Where (<PARAM>="Width") , 2))*0.52
Right click on the cross tab edge and select Format Crosstab... Then check the Show Footer check box in the Down Edge Display section of the General tab. Add extra rows in the footer if you need them.
Then manually add the formulas for count =Count(<VOLUME>) and mean =Average(<VOLUME>)
For me the final table now looks like this (With values rounded to 2dp):
0 7
Length Width Volume Length Width Volume
10001 5.32 4.68 60.59 8.89 7.30 246.35
10002 3.98 1.64 5.57 4.17 2.19 10.40
Count 2.00 2.00
Mean 33.08 128.37
The trick is making sure the calculations happen in the right context (that is, with respect to the header variables in the different sections of the table). You can add and remove variables and context with the functions In, ForAll and ForEach. Although I haven't needed to use them for this table.

Related Links

SAP Hana - STRING_AGG issue with ORDER BY CLAUSE
rrdtool does not keep max
Tableau Aggregate Percentage
use aggregates (min, max, avg) in CONSTRUCT query [duplicate]
R: transposing and aggregating columns
SQL Query Aggregate Error
Usage of aggregate functions in MarkLogic
Querying customDimensions in Google Bigquery
NHibernate - QueryOver criteria appearing in Where instead in Having clause, error
Howto aggregate on full data set in Spring Batch jobs?
Creating an aggregate function fails
Necessity of declaration of function in c and cpp
Calculate window average in tableau
Complexity asymptotic relation (theta, Big O, little o, Big Omega, little omega) between functions
What are TOP_COUNT and TOP_MAXCOUNT in BigQuery?
marklogic need advise for approach to aggregate documents

Categories

HOME
joomla
redux
mobile
dynamic
spss
where
azure-resource-manager
salesforce-lightning
download
msbi
sugarcrm
atlassian-fisheye
symfony-3.2
markdown
ejb-3.0
spring-data-solr
fine-uploader
lambda-calculus
greensock
simd
aws-devicefarm
android-wifi
formulas
fibonacci
prepros
sha
android-xml
sasl
windows-mobile
stack-trace
gulp-jshint
cqlsh
ios9
ibm-bpm
spring-oauth2
qt-designer
eclipse-jdt
jsonapi-resources
zimbra
android-geofence
oracle-bpm-suite
stdin
byobu
gem-fury
office-interop
wicket-tester
directadmin
php-mongodb
apiman
text-extraction
intervention
togglebutton
jks
jsfl
noise
cancan
aws-rds
activesupport
android-vectordrawable
dmalloc
huawei
stringbuilder
mac-app-store
visual-web-developer
jspx
xcode7.1
require-handlebars
jigsaw
patching
3d-rendering
treelist
nslocalizedstring
web-performance
overlapping
gtkwave
om
joomla3.3
vensim
photogrammetry
vectordrawable
teamstudio-unplugged
caption
information-hiding
apache-pivot
sync
time-frequency
drawable
nspopupbutton
isl
android-relativelayout
nodeunit
fastcgi-mono-server
pthreads-win32
nativequery
codio
mdp
jfilechooser
ojb
ia-32
wpa
latex-suite
cloudmade
rbm
tasklist
webpage-screenshot
jquery-1.8
flatten
systrace
bindinglist
reflexil
motorola-droid
sqlbuddy
commonsware
maven-eclipse-plugin
automapper-2
log-shipping
parallel-python
openwrap
backlight
object-tag
large-data-volumes
web-widget
office-2003

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App