Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

berryandcherry6
Not applicable

creating calender which contains weekends of months

Hi,

i need to create a calender which contains weekends of current month and previous month.

how could i do this.Please help me. Any help is appreciated.

Regards

Tags (2)
4 Replies
settu_periasamy
Not applicable

Re: creating calender which contains weekends of months

maxgro
Not applicable

Re: creating calender which contains weekends of months

maybe

Weekend(yourdatefield)    

Weekend(AddMonths(yourdatefield, -1))

berryandcherry6
Not applicable

Re: creating calender which contains weekends of months

Hi,

Thanks for reply

Above condition gives weekend of particular date.

But my requirement is if todays date is 07-08-2016, i want all the weekends that comes under this month. So i could use it for further purpose.

maxgro
Not applicable

Re: creating calender which contains weekends of months

weekend of today month and previous month


load

  Distinct WeekEnd(date)

Where

  WeekEnd(date) <= monthEnd(Today());

load

  Date(AddMonths(MonthStart(Today()), -1) + IterNo() -1) as date

AutoGenerate 1

While

  (AddMonths(MonthStart(Today()), -1) + IterNo() -1) <= MonthEnd(Today());



1.png