Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

URGENT : Problem with dimension - Aggr

I have a dimension Group (group of products) and I have a target on each group. Let's say for the group1 the target is 100.

It means that customer should by 100 products of group1. I need to display the number of customers who reach this target

I use a pivot table with the dimension Group and an expression:

Count(distinct aggr(if ( sum(Qty)>Target, Customer),Customer))

It give me result but below what I expect but if I select one of the group I get the correct result.

Group1 4

Group2 6

if I select Group1

Group1 36

Do you know why I got a different result when I select one of the group ?

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

I finally found the solution:

sum(if( aggr(sum(Qty),Group,Customer)>=Target,1,0))

View solution in original post

6 Replies
Or
MVP
MVP

Try:

Count(distinct aggr(if ( sum(Qty)>Target, Customer, Group),Customer))

Not applicable
Author

Try this

Count(distinct aggr(if ( sum(Qty)>=Target, Customer, Group),Customer))

Regards

ABDALLA

Not applicable
Author

I tried but I got the same result

Or
MVP
MVP

Possibly QV is having trouble evaluating the Target in your function, but I'm not really sure - without a sample it's hard to tell or try different functions to see if any of them work.

Not applicable
Author

I put a number instead of Target. But I got the same result. Any other Idea ?

Not applicable
Author

I finally found the solution:

sum(if( aggr(sum(Qty),Group,Customer)>=Target,1,0))