Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

markmccoid
Contributor II

AGGR Odd Behavior?

Hi,

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.

error loading image

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?

Thanks,

Mark

Tags (1)
2 Replies
MVP
MVP

AGGR Odd Behavior?

could you post an example?

markmccoid
Contributor II

AGGR Odd Behavior?

Sure. Attached is an example QVW with data for just one subscriber.

Thanks

Community Browser