This content has been marked as final. Show 2 replies
First, what I'm trying to accomplish is to take the Monthly Profit (Profit) for a Customer and use it to count how many customers where UNProfitable that month.
SUM(IF(AGGR(SUM(Profit),Month, Customer) < 0,1,0))
This works fine when the chart has Month in its dimensions, but when I collapse to Year, it will return the number of months a customer was UNprofitable.
So I thought I would just create a chart without months and use this expression:
SUM(IF(AGGR(SUM(Profit), Customer) < 0,1,0))
Works fine except I noticed that when I leave the month in the dimensions, the result for each month/subscriber is different. I would have through that it would be the same since the aggregation is over the customer.
Any thoughts on how I could get one expression to work for both the expanded and collapsed states and/or why the above behavior is happening with AGGR?