Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
2015 | 2016 | |||
year customer_num | individual yr sales | total yr sales | individual yr sales | total yr sales |
1 | 20 | 100 | 60 | 150 |
2 | 40 | 100 | 30 | 150 |
3 | 10 | 100 | 50 | 150 |
4 | 20 | 100 | 10 | 150 |
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.
2015 | 2016 | |||
year customer_num | individual yr sales | total yr sales | individual yr sales | total yr sales |
1 | 20 | - | 60 | - |
2 | 40 | - | 30 | 150 |
3 | 10 | - | 50 | - |
4 | 20 | 100 | 10 | - |
Any help is much appreciated!
Thanks
Try this:
Sum(TOTAL <year> sales)
or
Aggr(NODISTINCT Sum(sales), year)
The bottom one worked! Thanks!