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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculation in pivot table

Hello,

I'm back [:$]

I have a table (ResEvent) with :

  • ResEventId //Eventnumber
  • RelationId //Customer
  • GrossAmount //Price of the Event
  • TotalQuantity //Quantity Tickets Sold
  • BookYear //Year

That gives me :

ResEventId RelationId GrossAmount TotalQuantity BookYear

1 15 1800 90 2008

2 15 300 15 2008

3 15 2400 120 2009

What do I want to see ?

RelationId Quantity GrossAmount

2008 2009 Difference 2008 2009 Difference

15 105 120 x % 2100 2400 x %

I managed to create the table (pivot) BUT without the difference (the difference should be calculated, I can do it on paper (and excel and so on), but not in my QV-application.

Jochen

1 Solution

Accepted Solutions
Not applicable
Author

hi

please check the attached file and see if you issue is resolved

regards

peter

View solution in original post

5 Replies
Not applicable
Author

hi

can you attach your file this can be done in the pivot table itself through an expression, i can show u

regards

peter

Not applicable
Author

Here you are...

File attached

Not applicable
Author

hi

please check the attached file and see if you issue is resolved

regards

peter

Not applicable
Author

Please see attacehd for one solution. This solution uses the before function in the expression to calculate this.

There are other ways such a set analysis that also could be sued to solve this.

Regards,

Fredrik

Not applicable
Author

Such simple anwers !!

Why didn't I found it ?