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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
shahamel
Creator
Creator

Previous week

Can someone help me with this expression. I want to sum quantity. This quantity is summed for previous week. I can't seem to find the mistake.

sum({$<Year = {$(=max(Year) - $(=if(max(Week) = 1, 1, 0)))}, Week = {$(=max(Week) + $(=if(max(Week) = 1, 51, 0)))}

,
DateType={'Sales'}>} Quantity)

Any help is welcome

Gr. Sandeep

Labels (1)
2 Replies
MayilVahanan
MVP
MVP

Hi

     Do you have date num field?

     if so, you can use like this,

     =sum({<DateType={'Sales'}, DateFieldNum = {'$(=Max(DateFieldNum,-7))'}>}Quantity)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
shahamel
Creator
Creator
Author

Hi,

It is not quite what i was looking for, but you are almost there. I am trying to use your idea . If i am succesfull i will let you know. Otherwise i will give the approriate expression if i am able to find it.

Gr. Sandeep