Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Summarizing sales for day-364

I want to summarize the sales for the day which is 364 days before the day in the dimension.

Therefore I built the following expression:

SUM({$<DAY={$(=Only(DAY)-364)}>}SALES)

But the outcome is always 0.

What did I do wrong?

Thanks for your help.

3 Replies
sbaldwin
Partner - Creator III
Partner - Creator III

Hi, I find qlikview can be very precious when it comes to dealing with dates,  you may want to try something like :

changing   $(=Only(DAY)-364)  to date($(=Only(DAY)-364) ,'DD/MM/YYYY')

or maybe  :    '$(=date(only(DAY)-364.'DD/MM/YYYY'))'

it is dificult to say what you should do without knowing the exact format of your DAY field.

Thanks

Steve

Not applicable
Author

Thanks for your reply. Unfortunately it does not work.

In my file date is a number. For example 3\10\2011 is 40819.

If I just want to represent the day which was 364 days ago  the simple formula DAY-364 works.

sbaldwin
Partner - Creator III
Partner - Creator III

hi, as i said it is difficult to say what this issue is without looking at your dashboard, if you post it i could take a look.

(you don't have any other date filters on your dashboard that would cause the set to be removed do you ?)

Thanks

Steve