I am trying to use the aggr-function whereby the values which I want to aggregate are themselves already aggregated. I haven't managed to get it to work, so has anyone here encountered and solved this issue already?
thanks for your quick reply. Sadly your suggestion didn't do the trick either.
Let me explain the problem in more depth.
I want to aggregate values over calendar weeks and products. That alone seems quite straight forward:
aggr(sum(values), calendar_week, products)
My problem however is that my values aren't simple summable data fields like "cost" or "revenue". Instead these values are already calculated by using some sort of aggregation which is absolute necessary. In my case values that I want to use in the aggr-function are this:
The formula alone works perfectly. But if I put it into the aggr-function I get nothing but errors. So it must be a limitation of the aggr-function.
I've already tried to substitute the set analysis part with "sum(if(BE_StatusID < 4,BE_Anfrage1,0))" but no luck either. After stripping out piece by piece I eventually ended up only testing something like "count(BE_GclidClean)" as my values within the aggr-function, but again, no results. To me it looks like the aggr-function can't handle any additional aggregation (sum, count, etc) within its expression part.
To the best of my knowledge this is not a limitation of the Aggr function. You did not specify how you would like to use the aggregate. To take your code - assuming that you want this as a calc dimension:
This is syntactically correct and no more complex than many I have used without a problem. If this does not work, then it could be some issue in your data model. If that is the case, I suggest that you post a sample of your qvw file so that someone can look at it in more detail
Hope that helps
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein