Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
bob654321
Contributor
Contributor

Dynamic Period over Period Comparison in a Pivot Table ?

I'm trying to compare the sales for the months selected and  the same months for the  previous year  and add a sales variance percentage as a new column at the end. When I tried to do its, the variance is repeating for each month. I only want to display the sales variance between current month & current month of last year at the very end of the pivot table. How to do it in Qlikview ? I have attached a sample spreadsheet of the layout.

1 Solution

Accepted Solutions
qliksus
Specialist II
Specialist II

I cant attach any file form my environment  Let me detail you the steps

 

1) Go to the presentation tab in the pivot chart and enable the "Show Partial sum " option for the first dimension

2) In the "label for Total" enter Variance%

3) Go to the expression tab and type  if ( Dimensionality() = 0 ,  Sum(lasmonsales)/Sum(currenmonsales) , Sum( sales) )

 

 

 

View solution in original post

4 Replies
qliksus
Specialist II
Specialist II

Enable the Partial sum option for the fist dimension in your pivot table and name the label for total as Variance%  and create a expression like the below

If ( dimensionality()=0  ,  Sum(CMSALES)/sum(PREMonthsales) , Sum(sales))

bob654321
Contributor
Contributor
Author

Do you have a sample qvw to show this ?

qliksus
Specialist II
Specialist II

I cant attach any file form my environment  Let me detail you the steps

 

1) Go to the presentation tab in the pivot chart and enable the "Show Partial sum " option for the first dimension

2) In the "label for Total" enter Variance%

3) Go to the expression tab and type  if ( Dimensionality() = 0 ,  Sum(lasmonsales)/Sum(currenmonsales) , Sum( sales) )

 

 

 

Brett_Bleess
Employee
Employee

Did the posters last reply help you get what you needed working?  If so, please be sure to give them credit by clicking the Accept as Solution button on the post.  If you are still struggling with things, please provide an update, or if you used a different solution, you can post that and mark it as the accepted solution as well to give any future readers more ideas.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.