Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
berryandcherry6
Creator II
Creator II

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

4 Replies
settu_periasamy
Master III
Master III

maxgro
MVP
MVP

maybe

Weekend(yourdatefield)    

Weekend(AddMonths(yourdatefield, -1))

berryandcherry6
Creator II
Creator II
Author

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
MVP
MVP

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