Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for
Did you mean:
Contributor III

## AGGR in every row

Hi all,

maybe someone can help with a problem. I created a table with one dimension (Customer_Item) and and two measures (Sales and total sales of costumer). I calculated the total sales of costumer  with this formula:

aggr(sum(Sales),Customer)

But the result looks like this (see attachment)

I also tried aggr(sum(total <Customer> Sales),Customer). But the same result. I need the total sales of costumer in every row and not in a singel random row.

Next I tried to use this formula: sum(total <Customer> Sales)

This works if I use two dimensions (Customer and Item). But I need the ONE dimension Customer_Item.

Anyone an idea?

1 Solution

Accepted Solutions
Master II

aggr(sum(total <Customer> Sales),Customer) appears to be redundant as sum(total <customer>..  means aggr by customer.  what you may want to try is add a nodistinct clause:
aggr(nodistinct sum(Sales),Customer)

3 Replies
Master II

aggr(sum(total <Customer> Sales),Customer) appears to be redundant as sum(total <customer>..  means aggr by customer.  what you may want to try is add a nodistinct clause:
aggr(nodistinct sum(Sales),Customer)

Contributor III
Author

Wow, thank you so much! That´s it! 🙂

Master II

yw

Community Browser