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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
berryandcherry6
Creator III
Creator III

grouping of dates to 7 days

Hi,

I have a script, where it gives dates from particular date to some day.

LOAD

    Date(CanonicalDate, 'MM-DD-YYYY') AS CanonicalDate

RESIDENT DateBridge where  CanonicalDate >= addmonths (Date(WeekEnd(today(),-1)-56),-12,1) and CanonicalDate <= addmonths (Date(WeekEnd(today(),-1)),-12,1);

Here i need to group  dates from addmonths (Date(WeekEnd(today(),-1)),-12,1)  to  7 days each. I am using this for dimension in line graph where it has to show start and end date of  those 7 days

How could i do this?Please help me

Regards

2 Replies
arulsettu
Master III
Master III

hi

addmonths (Date(WeekEnd(today(),-1)),-12,1) gives 12-06-2015

addmonths (Date(WeekEnd(today(),-2)),-12,1) gives  05-06-2015


what is the output u expecting?

berryandcherry6
Creator III
Creator III
Author

Hi,

Thanks for reply

my expected output is

if today is 10/08/2016

i need to get previous exact same 10/08/2015.

here my grouping of days should start

10/08/2015 - 04/08/2015 - 1 st week

03/08/2015 -  28/07/2015 - 2nd week

-------

like this it has to group 7 days with start and end date of week. This i am using as dimension for line graph with start and end date of week.

Please help me on this