Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table: Difference between two columns Qlik Sense

Hello,

im new in Qlik Sense. I have a question: How i can get the difference between two columns?

e.g:

And how can i get the difference between two selected years? e.g.  Select 1: 2012 and 2014 : Select 2: 2015 and 2014

Thank you

Regards

Mustafa

5 Replies
Gysbert_Wassenaar

sum([CE11000.InvoiceSales]) - before(sum([CE11000.InvoiceSales]))


talk is cheap, supply exceeds demand
Not applicable
Author

Hello Gysbert,

im new in Qlik Sense. Can you tell me where i have to add this formula exactly?

Gysbert_Wassenaar

As a measure in your pivot table. If you want to use a KPI object then use this expression:

sum({<Calendar.Year={$(=max(Calendar.Year))}>}[CE11000.InvoiceSales]) - sum({<Calendar.Year={$(=min(Calendar.Year))}>}[CE11000.InvoiceSales])


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you Gysbert. Your answer was helpful

CastroM
Contributor
Contributor

Hi Gysbert. Many thanks for your tip on the current vs before approach. One question, if you may: how do we exclude from the visualization tha column showing null for the base period? The object still tries to show vs prior period.

Thanks.