# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save \$200. Learn More
Highlighted
New Contributor

## How can you calculate the variance of two columns in a pivot table?

Hi,

I have created a pivot table which has values as the rows and the financial year (FY18, FY19, etc) as the columns. I have calculated the different values as shown in the attachment. I am trying to insert a variance column after the FY19 column that calculates the variance between FY18 and FY19. Does anybody know how I can do that?

Any help on this would be much appreciated!

Regards,

Sumanth

5 Replies
Highlighted Employee

## Re: How can you calculate the variance of two columns in a pivot table?

Do you need this as  a pivot table ?

You can do this in a straight table using set analysis.

Highlighted MVP

## Re: How can you calculate the variance of two columns in a pivot table?

Enable totals for the year dimension and use Dimensionality() or SecondaryDimensionality() to calculate the variance conditionally in the total column.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
Contributor

## Re: How can you calculate the variance of two columns in a pivot table?

Could you attach the sample data?

Highlighted
New Contributor

## Re: How can you calculate the variance of two columns in a pivot table?

Hi Lisa,

In a straight table would I be able to get the calculated values (as shown in the image attached earlier) in the row and the dimension in the column. When I tried to do it, straight table does not have the option to do so! Hence I used pivot table.

Highlighted
New Contributor

## Re: How can you calculate the variance of two columns in a pivot table?

Hi Jonathan,

I am new to Qlik sense and never used Dimensionality. Can you please help me with the syntax or the process to do it?

Thanks.