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

Create Expression in Report Builder 3.0 Report to sum a column
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?

Categories

HOME
casting
spotfire
nltk
x509certificate
coordinates
terminal
opacity
activejdbc
osrm
jetbrains
xmlhttprequest
logstash-configuration
react-select
hql
openscad
aws-devicefarm
angular2-pipe
smali
google-drive-android-api
deployment-descriptor
libxml2
paper-trail-gem
drawrect
lines
wercker
imdb
directions
node-soap
restler
dropdownbox
minitest
javafxports
sdl-2
rythm
dotnetnuke-module
origami
lfe
ninja-forms
flume-ng
qt-quick
python-venv
scrapinghub
synchronized
hierarchical-clustering
xmldom
rivets.js
jsfl
aws-rds
printer-control-language
nls
portaudio
consolidation
ldd
settext
xcode7.1
foreground
netlink
key-value-store
syslog4j
qtruby
supervised-learning
video-embedding
methodology
dday
kramdown
angular-promise
jts
personality-insights
om
first-order-logic
avrcp
glog
log-analysis
opennebula
pymol
xmla
nsq
pysvn
caption
javadb
os.walk
clearcanvas
zoneminder
visual-studio-setup-proje
sendy
pthreads-win32
.net-reflector
db2-connect
node-amqp
stringstream
http-compression
qmainwindow
reflexil
cgaffinetransform
virtual-printer
soapexception
method-call
object-tag
meego-harmattan
cpack
mediastreamsource
newspeak
helios
focus-stealing
time-management
cstring

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