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

New column to calculate variance between month

Hi,

I have the following table with the first 2 columns in Qlikview:

Discharge
  Month_Year
Elective- NumberVariance
Apr-141,883
May-141,97491
Jun-141,852-122
Jul-141,993141
Aug-141,867-126

The third column is what I want to produce in Qlikview, but cant work out how.

Any advice?

Note, that the Discharge month is a cyclic group.

Thank you.

1 Solution

Accepted Solutions
sunny_talwar

May be use this expression:

=YourExpressionForElectiveNumber - Above(YourExpressionForElectiveNumber)

View solution in original post

4 Replies
sunny_talwar

May be use this expression:

=YourExpressionForElectiveNumber - Above(YourExpressionForElectiveNumber)

Not applicable
Author

Thank you!

Worked line a treat

sunny_talwar

Awesome

I am glad it worked the way you wanted.

Best,

Sunny

Not applicable
Author

Ah, have problem......

When I expand on the pivot table, I get the following:

AdmissionMonthYYAdm_DivElective - TotalElective -
  Total Variance
Aug-15Division 1394-
Aug-15Division 22-392
Aug-15Division 3275273
Aug-15Division 4129-146
Aug-15Division 5973844
Aug-15Division 60-973
Sep-15Division 1408-
Sep-15Division 21-407
Sep-15Division 3304303
Sep-15Division 4173-131
Sep-15Division 51,1821009

For Sep 15 and Division 1, I need the variance between Aug 15 and Division 1.

Any ideas?