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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dimension level difference for expression in pivot table

Hi all,

I've spent many hours trying to find solution to following:

I have a pivot table with 2 dimensions and 2 Expressions. The dimensions are Dept and Week where Week is simply current week number for current year and current week number for last year. (Ex Week will have two values 201220 and 201120, this dimension is calculated using WeekSeq where current weekid 201220 has seq -1 and 201120 has seq -53 since there are 52 weeks in a year). Now I added two expressions to calculate Sales units and Sales dollars.

I would like to add a column in the pivot table that is the difference between 201120 and 201220. So infact I want the table to look something like: Wehere difference is 201220 - 201120.

DeptWeek201120201220Difference
BOYSSales Units3014627638
SALES $283244.3257467
FAMILY UNDERSales Units381
SALES $317.021
GIRLSSales Units1090128264
SALES $133961.51266853
INFANT Sales Units1546412709
SALES $169133.51147539
LADIES OUTSales Units-425

SALES $-6879
LADIES SLEEPSales Units116275311
SALES $151740.5171732
LADIESSales Units3148915174
SALES $278691.39147576
MENSSales Units10296059695
SALES $904260.24542765
2 Replies
Not applicable
Author

Hi,

I have only used your table. Maybe you can uns the attached file for your data.

Regards
Vicky

Not applicable
Author

Vicky,

Thanks for the reply. Your solution works however I don't think its the most optimal solution since the data set above was a very simplified version. I was looking for a method to use either pivot table or straight table to produce same result.

Basically show a column with differences just as you would show totals.

Thanks,

Grif