Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

2 Replies
MayilVahanan

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