Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to display the Last week values in Pivot table

Hello,

Good Evening All, I would like to display the last week values using the  Dimention is WEEK and Expression is Sum(Invoicess).

I tried = PEEK(Sum(Invoicess),-1), its not working.


Can any one help me how to this in a pivot table to display the last week Sum(Invoices).

Regards

Joe

2 Replies
swuehl
MVP
MVP

Hi Joe,

WEEK is a numerical, right?

I think you could try a set expression like

= sum({<WEEK = {'$(=max(WEEK))'}>} Invoices)

as expression in your pivot table, which should limit your week dimension to last week within your current week selection.

Hope this helps,

Stefan

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Unfortunately, Set Analysis won't work here, because Week is also a Chart Dimension. If you need to present sales for a prior week (as opposed to the "current" week) in a chart, you'd have to create an additional table with another Week field and associate the two fields in such a way that the additional week field will represent the "next week" compared to the original week field which is associated with the data. Then, you can create a chart with the new field as a dimension, and it will show Prior week's data based on the association between the fields.

For example:

New WeekWeekSales
2011/022011/011000
2011/032011/022000
2011/042011/033000



This way, Sales for Week 01 can be presented for "New Week" 2011/02 when "New Week" is used as a Dimension.