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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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