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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Week aggregation

Hi, I need to aggregate data by week and I see problem doing this. I could use function endweek(date) and solve the problem but when I do this I get problem with the month analysis, becuse the end week could be on different month. One example is 201006 where we have week 26 and 27.

Is there a way to use the ordinary weeks and set the end weeks for every new month ?

exampel

20100628 - end week 20100630 instead of 20100704

20100629 - end week 20100630 instead of 20100704

20100630 - end week 20100630 instead of 20100704

Regards M

1 Solution

Accepted Solutions
Not applicable
Author

2 Replies
sridhar240784
Creator III
Creator III

Hi,

Can we do some this like, if the weekend of you transaction date is not equal to the current month then you could use month end function to calculate the date. Have a look at the below expression.

=IF(MONTH(WEEKEND(TODAY())) = MONTH(TODAY()),WEEKEND(TODAY()),MONTHEND(TODAY()))

In place of 'Today()', replace you transaction date.

Hope this helps you.

-Sridhar

Not applicable
Author

Perfect !