Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
stoic_presi
Contributor II
Contributor II

variance in pivot table

Hi ,

I am new to Qlik Sense. I have created a pivot table with current year and last year as columns and rows are calculated measures. I need a 3rd column which is the difference/variance  of  curr. year and last year. I have currently used a separate table to calculate the variance but i want it in the same table.

 

thanks.

1 Reply
Channa
Specialist III
Specialist III

Dimension Row : Company

Column : ValueList('CurrentYear','PreviousYear','Varience')

Measure :

pick(match(ValueList('CurrentYear','PreviousYear','Varience'),'CurrentYear','PreviousYear','Varience'),
sum({<Year={'CurrentYear'}>}value),
sum({<Year={'PreviousYear'}>}value),
(sum({<Year={'CurrentYear'}>}value)-sum({<Year={'PreviousYear'}>}value))
)

 

--you can do this with ValueList--try to read about it

Channa