Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sorting by week

Hi All,

I am trying to create a chart sorting it by week but the problem is that I need to show the last weeks of the year then the 1st week of  this year ..can any one help?

11 Replies
nagaiank
Specialist III
Specialist III

Yes. You can use Week as dimension with YearWeek ascending as sort order.

Vegar
MVP
MVP

@sunny_talwar wrote:

Create a new field in the script like this

(Year * 100) + Week as YearWeek


Be aware that week year expressions created by week and year field will have issues in December certain years.

E.g. 2018-12-31 which is in week 1! and year 2018, but it should not be considered as 201801, but 201901.

An better approach would be to create YearWeek using monthname(dateField,'YYYYMM')