Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
davidteke
Contributor II
Contributor II

How Do I refer to cells in a pivot table?

Hi I am new to qlikview and I have been playing around with some sales data. I have a pivot table with Year as a Dimension and Sum(sales) as an expression, so I want to figure out the sales variance basically adding another expression that will give the sales variance.. below is an e.g. of a pivot table I have. Thank You in Advance

YearSum(Sales)Sales Variance
20071222264.36????
20082572552.27??
20093266290.59??
5 Replies
israrkhan
Specialist II
Specialist II

try this

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

saumyashah90
Specialist
Specialist

Dont Increase the complexity by doing it in Expression,

While loading script you can make a new field

like

1.png

Like This You Can Continue With Formula and get over it in Script

salto
Specialist II
Specialist II

Hi Saumya,

your point is good, but (correct me if I am wrong), it needs the data to be loaded in the same order as we want it to be displayed in the Pivot Table, doesn' it?

Regards!

saumyashah90
Specialist
Specialist

yup correct,
so after this we can also load it in Table Box

davidteke
Contributor II
Contributor II
Author

Hi guys Thank you for your help, I ended up changing the approach to solve my problem. I used Country as my dimension and and added an expression to get  'Year To Date Sales' 

Sum ({$<Year = {$(=max(Year)-4)}>}Sales)

I copied it from a demo App I got from Qlikview's website but I  am not really sure how this expression really works, please take me through it.

bellow is a screen shot of my pivot table

Capture.PNG.png