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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare last week to current week

Hi All.

I'm having a problem while trying to implement the following request:

let's say I have the following fields:

Store name

Number of sold Items

Week number.

I want to display in a straight table the 5 bottom stores that sold Items last week (count (Number of sold Items)>0 )

but on the current week which was selected they sold nothing or much less items.

Can someone please Advise?

thanks. 

Labels (1)
1 Solution

Accepted Solutions
consenit
Partner - Creator II
Partner - Creator II

Hi there.

Have a look at the document attached.

Kind regards,

Ernesto.

View solution in original post

6 Replies
consenit
Partner - Creator II
Partner - Creator II

Hi there.

Have a look at the document attached.

Kind regards,

Ernesto.

Anonymous
Not applicable
Author

Hello,

maybe you can use [Store name] as dimension and the following expression (if you want to display sum of number, otherwise you cab use count):

if(count({<WEEK={"$(=$(vWeek)-1)"}>}NUMBER)>0 and (count(NUMBER)=0 or IsNull(count(NUMBER))), sum({<WEEK={"$(=$(vWeek)-1)"}>}NUMBER))

In dimesion limit tab you can set how many stores display in the dimension


Hope this helps, Elena

Anonymous
Not applicable
Author

Sorry, I forgot a detail:

vWeek= GetFieldSelections(WEEK) where WEEK is your Week number.

And NUMBER is your Number of sold Items.

Not applicable
Author

thanks you so much!

Not applicable
Author

Thank you!!!

anbu1984
Master III
Master III

To calculate difference current and last week, you can use Column(2) - Column(1)