Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
devarasu07
Master II
Master II

First 4 Weeks Sold Qty?

Hi All,


Trying to get first 4 Weeks and 8 week sold quantity using set analysis. kindly advise.

=sum({<Date={">=$(=Date(Min(Date)))<=$(=Date(Min(Date)+28))"}>} SoldQty)

4 Wks Sold Qty.jpg

25 Replies
Anonymous
Not applicable

Since you are making selections, and qlikview's AQL system applies the selection to all the fields. So you get those values same as the value you get for Current week sales.

try this,

=sum({Date={">=$(=Date(Min(Date)))<=$(=Date(Min(Date)+28))"},month=,year=>} SoldQty)

apply the same for the week sales also.

I hope this works.

devarasu07
Master II
Master II
Author

Hi Anirban,

It's not working, week filter exclusion not working in below my expression.

Issue:

if We do week selection then 4 week sold quantity gives wrong result.

(i.e: below expression working if we don't select any weeks from week filter, but my requirement want to have dynamic week selection filter)

=sum({<Week-=,Date={">=$(=Date(Min(Date)))<=$(=Date(Min(Date)+28))"}>} SoldQty)

Thanks, Dev

MK_QSL
MVP
MVP

Use these expressions

4 Weeks

=SUM({<Date = {">=$(=Date(WeekStart(Min(Date))))<=$(=Date(WeekStart(Min(Date))+27))"}>}SoldQty)

8 Weeks

=SUM({<Date = {">=$(=Date(WeekStart(Min(Date))))<=$(=Date(WeekStart(Min(Date))+55))"}>}SoldQty)

girirajsinh
Creator III
Creator III

Hi

Please find attached qvw. It has the result you are looking for

devarasu07
Master II
Master II
Author

Hi Manish,

Thanks for your kind reply, I've tried the same and it's working fine if we don't select any week number from week filter. but my requirement need to have week filter selection

below screen shot, left side image has correct result (without week selection), but if i do week selection then it's goes wrong.(refer right image). i already excluded week filter in set analysis but it's not considering. kindly adivse

4 Week ROS

=SUM({<Week=,Date = {">=$(=Date(WeekStart(Min(Date))))<=$(=Date(WeekStart(Min(Date))+27))"}>}SoldQty)

4ROS.jpg

devarasu07
Master II
Master II
Author

Hi Giri,

Same issue, when we do week filter selection then it's not working. any other suggestion. thanks

Thanks,Deva

girirajsinh
Creator III
Creator III

hi Deva

Please find attached one. That should disregards the week selection

MK_QSL
MVP
MVP

Let me have clarity on this?

Do you want to consider week selection?

What is the result you are looking for if you select Year 2016 and Week 53 with ArticleNo CK1-60360931?

Anonymous
Not applicable

yeah got it. u don't have month filter, so exclude it. add week filter. and yes please make it 27 instead of 28 as u need 4 weeks including the starting date.