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?
'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