aggregate-functions


Mondrian: Help picking the right aggregator for Measures?


There are some measurements I calculate that don't roll up in the same way as something like sales, or revenue. In sales if you wanted to calculate sales for the quarter you could sum all entries in the sales for each month falling in that quarter. And generally you'd just state in the schema the aggregator for the Sales Measure as sum and it would do that.
Consider we have a table of employment entries. If an employee was employed for that month there is an entry in the table for that employee. And we want to know the head count for either Month, Quarter, or year. In this case Measures like Head Count don't make sense to sum up in the same way. The head count for the quarter is the same as the head count for the last day of the month occurring in that quarter. Adding up the head count for Q1 isn't the sum of Jan, Feb, and Mar. It's simply what was the head count on Mar 31? However, I don't see any choice from the given aggregators that would allow you to specify that.
Everything works great for Head Count when you are using the lowest division of time like month, but when you start to look at head count for the quarter or year summing up doesn't make much sense.
So how is something like head count handled given that there are probably lots of other dimensions that could be included on the facts used to calculate head count? You need to roll up head count on some dimensions, but you can't sum across all dated entries? I'm looking to encapsulate this logic into the schema in some way so that users don't have to add extra filters every time they want to define a report using head count.
No one attempted to answer this question because it was poorly asked. So I asked another question with what I think is a better question.
How to perform a Distinct Sum using MDX?

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
actionscript-3
repository
ckan
grizzly
arcgis
hex
crm
esxi
localhost
perl6
markdown
pyodbc
angular-universal
responsive
pylint
geography
indri
ejb-3.1
opengraph
tcpdf
scrapy-spider
grunt-contrib-uglify
deployment-descriptor
android-cursorloader
undo
exacttarget
flickr
apache-falcon
pymunk
mkdir
ragel
device-driver
client-server
nscollectionview
mockserver
linkurious
file-descriptor
java-5
colorbox
firefox-developer-edition
servicebus
inner-join
chrome-custom-tabs
emacs24
dcom
dna-sequence
jenkins-docker
htop
sqlproj
easy-thumbnails
racket-student-languages
glade
alfred
symantec
x12
altova
hfp
php-java-bridge
sqlxml
alchemy
hana-sql-script
google-app-engine-php
magnet-uri
edgar
musicbrainz
android-networking
google-experiments
alpha-beta-pruning
method-overloading
visual-c#-express-2010
code-smell
image-preloader
nodeunit
elixir-framework
infor-eam
netbeans-plugins
randomaccessfile
mencoder
zend-db-table
violation
record-locking
source-depot
yii-components
certificate-revocation
sup
datasheet
parsec
pex-and-moles
mysql-logic
large-data-volumes
projectgen
unauthorized
jgrowl
high-load

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