Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
bensca04
Contributor III
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
edwin
Master II
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)

View solution in original post

3 Replies
edwin
Master II
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)

bensca04
Contributor III
Contributor III
Author

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

edwin
Master II
Master II

yw