Data granularity is per customer, per invoice date, per product type.
Generally the idea is simple:
We have a moving average calculation of the volume per week. MA based on last 12 weeks (MA Volume): window_sum(sum([Volume]),-11,0)/window_count(count([Volume]), -11,0)
We need to see the deviation of the current week vs the MA for that week (Vol DIFF): SUM([Volume])-[MA Calc]
We need to sum up the deviations for a fixed period of time (Year/Month) Basically this should show us whether on average, for a given period of time, we deviate positively or negatively vs the base.
Unfortunately I get errors like:
"Argument to SUM (an aggregate function) is already an aggregation, and cannot be further aggregated." Or "Level of detail expressions cannot contain table calculations or the ATTR function"
Any ideas how I can go around this one?