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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

Problem with aggr command

Hello.

I am facing a problem with the aggr command.

I attach a qvw that i have some data and in the level of item the aggregation is correct about the summary of maximum QTY,

but when i create a chart in the level of promo code i miss in the promo 517085 the QTY 2 that summarized in the other promos.

When i select only the promo code 517085 the result is correct QTY 2

Can anyone help me to find a solution ?

Thank you in advance.

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Not really sure what you want to calculate, but maybe you need the NODISTINCT qualifier here:

=SUM(aggr(NODISTINCT max(QTY),SALE_NBR,SALE_LINE))

View solution in original post

2 Replies
swuehl
Champion III
Champion III

Not really sure what you want to calculate, but maybe you need the NODISTINCT qualifier here:

=SUM(aggr(NODISTINCT max(QTY),SALE_NBR,SALE_LINE))

geogou1973
Creator
Creator
Author

It is correct.

Thank you very much.