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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
its_anandrjs
Champion III
Champion III

Week start selection

Hi All,

I have urgent requirement that if i select the weekstart value in weekstart list box

it should display like when selection 8/8/2011

it should display this

8/7/2011

8/6/2011

8/5/2011

8/4/2011

8/3/2011

8/2/2011

8/1/2011

and sum the values on that days.

Regards

Anand

23 Replies
christian77
Partner - Specialist
Partner - Specialist

Hi:

There is a funktion week() that gives the number of the week in a year.

With set analysis Year={‘$(CurrentYear)’}, Week={‘CurrentWeek’}, Date={‘<=$(CurrentDate)’}, right after you have created those 3 variables.

Not applicable

Does your customer table contain these fileds?

customer_id

Date_for_disconnect

weekstart(date_for_disconnect) as Week_start

Then a  listbox on  the field  Week_start  let you choose the week  (8/1/2011, 8/8/2011 etc)

And a chart/diagram displaying

Date_for_disconnect

customer_id

will show only the dates in the selcted week due to the fact that both the weekstart date and the "real" date is in the customer table

its_anandrjs
Champion III
Champion III
Author

Hi,

Yes there is

customer_id

Date_for_disconnect

weekstart(date_for_disconnect) as Week_start

is available and the list box for weekstart is available but condition is that i need to select only sinlge week start on the basis of that like i select 8/8/2011 (Weekstart)

then a straight table work acording to below dates to be display like

8/7/2011 

8/6/2011 

8/5/2011 

8/4/2011 

8/3/2011 

8/2/2011 

8/1/2011 

for this dates and its customer_id

I think you almost correct please help for this

Regards

Anand

its_anandrjs
Champion III
Champion III
Author

Hi,

But there is a single selection only for weekstart on the basis of that.

Regards

Anand

Not applicable

Hm, I dont't understand  what you mean.

From a listbox you can choose several values (several at once, Ctrl+select to add more to the selection). But I'm not sure this is what you are thinking about?

christian77
Partner - Specialist
Partner - Specialist

Well, I use set analysis a lot.

If you are going by selections, use week(date) in the script or set it as an expresion in a list box.

its_anandrjs
Champion III
Champion III
Author

Hi All,

See the attached sample on that by default i select 8/8/2011

and in table box it is display only the dates like

Date

8/8/2011

8/9/2011

8/10/2011

8/11/2011

8/12/2011

8/13/2011

8/14/2011

but how can i get dates like

8/7/2011

8/6/2011

8/5/2011

8/4/2011

8/3/2011

8/2/2011

8/1/2011

it is understood by default it select that days but how get the above dates.

Regards,

Anand

Not applicable

You want to display the dates in the week before the week you select?

The easiest is to select the week before.

Or you can use WeekEnd instead of WeekStart (displays Sundays, if you want to show Monday add one day to your listbox display).

It seems like it is only the 6 days before, is that significant?

its_anandrjs
Champion III
Champion III
Author

Hi,

Yes it should be reverse of the dates just opposite it looks right now reverse of that, means go back to six days.

Regards,

Anand

Not applicable

Hi,

Please see the attached sample can help you.

Cheers.