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

'Your query does not include the specified expression as part of an aggregate function' error for calculated fields
Creating percentile_cont as aggregate function in Vertica
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

Categories

HOME
ckan
model-view-controller
itunesconnect
mysqli
django-middleware
arguments
pandoc
overrides
mailchimp
aggregation-framework
collision-detection
handlebars.js
phpexcel
ndepend
react-select
tag-cloud
printf
scotty
ampscript
url-parameters
gomobile
ng-tags-input
prepros
ecmascript-2017
ithit-webdav-server
rancher
uibarbuttonitem
ipython-parallel
login-required
jql
postgresql-9.6
maven-2
outlook-2010
stochastic-process
framebuffer
area
jquery-ui-slider
risc
niagara-ax
monaca
vertex
fckeditor
zedgraph
cardview
pyautogui
scikit-image
git-cherry-pick
airwatch
hotkeys
camellia
treelist
cexception
methodology
matlab-engine
gnu-sort
edgar
updating
litedb
eula
photogrammetry
grails-3.0.9
tidesdk
perfect-scrollbar
jad
formbuilder
parsefloat
ant-contrib
class-library
kernel-density
grunt-wiredep
google-mirror-api
pechkin
cab
select2-rails
generator-expression
openafs
expresso-store
xcode4.6.3
php-gettext
filedialog
django-1.4
capitalization
digg
qvariant
functional-specifications
activescaffold
table-valued-parameters
dongle
carbon-emacs
appointment
time-management
onresize
content-delivery-network
hotfix

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