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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

subtracting 'cross horizontal' in pivot table?

Hi Guys,

I have a similar pivot table below. On the first colum are 2 expressions all the headers repesent the dimension year

Expressions2008
2009201020112012
sum (investments)180.000178000152.000104.88493.021
sum (investments) - (expenses)170.000168.000148.000100.00090.000
Difference between next year?200020.00048.00010.000-

Now I would like to create an expression that does the following:

sum (investments) - (expenses) of 2008 - sum (investments) - (expenses) of 2009  (170.000 - 168.000) = 2000

sum (investments) - (expenses) of 2009 - sum (investments) - (expenses) of 2010  (168000 - 148000)=20.000

sum (investments) - (expenses) of 2010 - sum (investments) - (expenses) of 2011 (148000 - 100.000)=48.000

sum (investments) - (expenses) of 2011 - sum (investments) - (expenses) of 2012 (100.000 - 90.000)= 10.000

Is this possible within Qlikview?

Thanks in advance!

Carter.

1 Solution

Accepted Solutions
Not applicable
Author

i mean try function below()

View solution in original post

3 Replies
Not applicable
Author

you dont need to do it by pivot table (try straight and horizontal view)

as for your question ... try function above()

your expression should look :

=sum(investments-expenses)-Below(sum(investments-expenses))

Not applicable
Author

i mean try function below()

Not applicable
Author

Many Thanks ! Below and straight table using horizontal view, did the job!

Carter