Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with set analysis

I have forecast for 20 weeks in the future. I want a graph that only shows current week + 10 weeks. What set analysis could I use?

1 Solution

Accepted Solutions
maxgro
MVP
MVP

Sum({$ <Week={">=$(=week(max([Snapshot Week])))<=$(=week(max([Snapshot Week]))+10)"}>} [Forecast 1])

get rid of calendar_week, add

calendar_week=

in set analysis

field1=

means remove the selection in field1

8/31/2015

if you want the currenti year add 

Year={$(=Year(max([Snapshot Week])))}>}

Sum({$ <

calendar_week=,

Week={">=$(=week(max([Snapshot Week])))<=$(=week(max([Snapshot Week]))+10)"},

Year={$(=Year(max([Snapshot Week])))}>}

[Forecast 1])

View solution in original post

12 Replies
JonnyPoole
Employee
Employee

If you have a sample QVW that would help.

Not applicable

Here is a similar app that I've used from earlier.

jyothish8807
Master II
Master II

Hi Qlik,

Since your dated are already splitted into week so simply take current Date and Current date +10.It will give the out pot.Use set analysis.

Regards

KC

Best Regards,
KC
maxgro
MVP
MVP

maybe this

Sum({$ <Week={">=$(=week(Today()))<=$(=week(Today())+10)"},Year={$(=Year(today()))}>} [Forecast 1])

gabriel_kirst
Creator III
Creator III

Hello!

You can find attached the modifications that I did in your app. I think this solve your problem.

Regards,

Gabriel

Not applicable

Thanks everyone for their contribution.

Sum({$ <Week={">=$(=week(Today()))<=$(=week(Today())+10)"},Year={$(=Year(today()))}>} [Forecast 1])


This seems to be the most suitable solution BUT whenever I choose a calendar_week, it says 'no data to display'



Look at this new application. It has the 'snapshot week'. Is there anyway to say, look at the Snapshot week, and display the data for calendar week for  10 weeks.


So if the snapshot week is 9/1/2014, then I want to display the calendar week 9/1/2014 - 11/3/2014 data in the graph....

maxgro
MVP
MVP

if you don't want to consider the selection in calendar_week add bold

Sum({$ <calendar_week=, Week={">=$(=week(Today()))<=$(=week(Today())+10)"},Year={$(=Year(today()))}>} [Forecast 1])

maxgro
MVP
MVP

Sum({$ <Week={">=$(=week(max([Snapshot Week])))<=$(=week(max([Snapshot Week]))+10)"}>} [Forecast 1])

get rid of calendar_week, add

calendar_week=

in set analysis

field1=

means remove the selection in field1

8/31/2015

if you want the currenti year add 

Year={$(=Year(max([Snapshot Week])))}>}

Sum({$ <

calendar_week=,

Week={">=$(=week(max([Snapshot Week])))<=$(=week(max([Snapshot Week]))+10)"},

Year={$(=Year(max([Snapshot Week])))}>}

[Forecast 1])

View solution in original post

Not applicable

This still considers the selection in calendar_week ......and it also shows the last date available  8/31/2015. Any way to get rid of that?