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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregation Sum and Running Total by YEAR

Hello everyone;

I have a pivot table in which I have YEAR and CA( Sales) .  At the beginning, I want to display CA for each Year , But in the End of my pivot table I want to display the sum of CA of the last 3 years like the table bellow.


YEARCA YEARCACA 2
200430 808 147 200430 808 14730 808 147
200548 861 126 200548 861 12648 861 126
200681 700 925 200681 700 92581 700 925
200765 124 463 200765 124 46365 124 463
2008107 623 593 2008107 623 593107 623 593
200999 820 060 200999 820 06072 113 460
201089 784 698 201089 784 69899 820 060
2011137 087 828 2011137 087 828342 468 400
2012133 267 111 2012133 267 111
201372 113 460 201372 113 460
Total866 191 411 TOTAL866 191 411866 191 411

Is It possible to display That table in Qlikview ??

5 Replies
whiteline
Master II
Master II

Hi.

You can use calculated dimension to join the years like this:

=aggr(if(Year<2011, Year, '2011-2013'), Year)

its_anandrjs
Champion III
Champion III

Write an expression like the attached sample script

Dimension:- YEAR

Expr1:- Sum(CA)

Expr2:- if(YEAR = 2011, sum(TOTAL {<YEAR ={2011,2012,2013}>} CA),sum({<YEAR ={2004,2005,2006,2007,2008,2009,2010}>} CA))

Then You get out put :-

StrTblOutput.png

Not applicable
Author

Thank you Anand Chouhan for your replay, It works

But how about merge and center for that 3 years i the table ?? Is it possible. ??

vipin_mishra479
Creator II
Creator II

Hi

Write an expression like the attached sample script

Dimension:- YEAR

Expr1:- Sum(CA)

Expr2:- if(YEAR = 2011, sum(TOTAL {<YEAR ={2011,2012,2013}>} CA),if(YEAR < 2011,sum(CA), '  ' )

Regards,

vipin

its_anandrjs
Champion III
Champion III

Thanks, I believe that is not possible i let you know if that should also worked and provide details to you.

Regards