Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pivot Table - Adding Previous Column Values

Helo,

I have this data

  

NameValue
Initial3309.46
Att14
Att2-2
Att310
Final12

I am trying to create a table that looks like this

 

InitialAtt1Att2Att3Final
Start3309.46 3321.46
Up + 4-10
Down - -2-
Change 3313.463311.463321.46

I could get "Start", "Up" and "Down" in qlikview using a pivot table. Couldnt get "Change" yet.

How do I get access to previous column values? I tried using before and above but still couldnt get the result.

Attached sample

1 Solution

Accepted Solutions
sunny_talwar

May be try this:

if(match(Name, 'Initial', 'Final'), '', RangeSum(Before(Sum(Value), 0, ColumnNo())))


Capture.PNG

View solution in original post

2 Replies
sunny_talwar

May be try this:

if(match(Name, 'Initial', 'Final'), '', RangeSum(Before(Sum(Value), 0, ColumnNo())))


Capture.PNG

swuehl
MVP
MVP

For Change, try

if(match(Name, 'Initial', 'Final'), '', Rangesum(before(sum(Value),0,ColumnNo())))