Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Totals in pivot table

Hi,

I have searched through previous discussions but I haven't been able to find the answer to my particular question. I want to the totals to appear for each year rather than an overall total. I have tried ticking the partial sums I don't get the totals for the year (name, year boundary are all dimensions).

This is what I get

BoundaryTotalHighHighHighInlierInlierInlierOneDayOneDayOneDay
NameYear 201020112012201020112012201020112012
A 125-334234411-1
B 431-1912152-3
C 16---454111

This is what I want

BoundaryTotalTotalTotalHighHighHighInlierInlierInlierOneDayOneDayOneDay
NameYear201020112012201020112012201020112012201020112012
A 433745-334234411-1
B 1212191-1912152-3
C 565---454111
10 Replies
Anonymous
Not applicable
Author

Hi

Try useing this expression Sum({$<year={'2010'}>}sales)

Regards

Harsha

Anonymous
Not applicable
Author

Thanks for your reply. I have only shown a small portion of the data, there are a lot of years in the data and I didn't want to have to add an expression for each year. Do you think that adding an expression is the only way?

Kind regards,
Emer

Anonymous
Not applicable
Author

can you post some sample data

ecolomer
Master II
Master II

Is that you need?

p04.png

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

If you drag the dimensions in the Pivot you can change what is totalled where - so you could group by year and get a total for each year.

Another approach may be to look at creating an association in the data model High, Inlier and OneDay to themselves, and then also to a Total grouping, an inline like this will do this:

SumTotal:

Load

   Boundary,

   BoundaryTotal

INLINE [

Boundary,BoudnaryTotal

High,High

Inlier,Inlier

OneDay,OneDay

High,Total

Inlier,Total

OneDay,Total

];

You then just use the BoudaryTotal as a dimension rather than Boundary.

I've explained this more fully in this blog post:

http://www.quickintelligence.co.uk/qlikview-accumulate-values/

Steve

Anonymous
Not applicable
Author

Yes this is what I need

Anonymous
Not applicable
Author

Thanks Steve, no matter which way I dragged the columns I couldn't get the totals right. I have used the boundary total approach and it works great.

ecolomer
Master II
Master II

The file QV with the example

Anonymous
Not applicable
Author

Thanks Enrique this is very helful