Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Relative percentage in a pivot table

Hello,

I have a pivot table with Sales figures against a corresponding year.

Ynum          Year Sales

Y1          2000 9876896

Y2          2001 9069876

Y3          2002 6986986

Need to calculate

Y2/Y1

Y3/Y2

...

I need to calculate a year on year evolution. The problem is that adding an expression to the pivot table only ads vertical columns, which doesnt let me use the ABOVE() function to calculate the relative percentage with regard to the previous year.

Any ideas?

Thanks in advance,

Regards

1 Solution

Accepted Solutions
Not applicable

Re: Relative percentage in a pivot table

If you are trying a multi-dimensional table, the expression should be: sum(Sales)/above(total sum(Sales)). Then it appears to work as you desire.

5 Replies
chauhans85
Esteemed Contributor

Relative percentage in a pivot table

calculate Y1 value in first expression

calculate Y2 value in second expression

calculate Y3 value in third expression

then in forth expression

column(2)/column(1)

in fifth

column(3)/column(2)

hope this helps

Relative percentage in a pivot table

Hi,

     Check with this

     Sum(Sales)/Above(Sum(Sales))

Celambarasan

Not applicable

Relative percentage in a pivot table

Hello Celambarasan Adhimulam

Indeed this is what I tried, but adding this calculation Sum(Sales)/Above(Sum(Sales)) to the expression ads a column after the sales column and not as a row below years. And so it is not calculating correctly the ABOVE().


Not applicable

Re: Relative percentage in a pivot table

If you are trying a multi-dimensional table, the expression should be: sum(Sales)/above(total sum(Sales)). Then it appears to work as you desire.

Not applicable

Re: Relative percentage in a pivot table

I think it was the Total, it works fine!

Thanks a lot!

Cheers!

Community Browser