Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ahudache
Contributor
Contributor

AGGR with dimensions

Hello,

Here is my situation:

Pivot table:

Dimension 1: customer_num

Dimension 2: year

Expression 1: Individual sales

Expression 2: total sales for that particular year

   

20152016

year

customer_num

individual yr sales

total yr sales

individual yr salestotal yr sales
12010060150
24010030150
31010050150
42010010150

The column I'm having trouble populating is the "total yr sales". Currently I have:

Aggr(sum(sales),year)

However, this produces an odd outcome with only 1 row per column populated, so I'm unable to utilize this value for other expressions.

20152016

year

customer_num

individual yr sales

total yr sales

individual yr salestotal yr sales
120-60-
240-30150
310-50-
42010010-

Any help is much appreciated!

Thanks

2 Replies
sunny_talwar

Try this:

Sum(TOTAL <year> sales)

or

Aggr(NODISTINCT Sum(sales), year)

ahudache
Contributor
Contributor
Author

The bottom one worked! Thanks!