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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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?

Labels (1)
11 Replies
Anil_Babu_Samineni
MVP
MVP

Can you please share sample

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

week numbervalue
52 (2017)80
1 (2018)90
2 (2018)100
sunny_talwar
MVP
MVP

Sort using YearWeek field rather than just Week... YearWeek will make sure that sorting is also based on Year field and not just week field

sunny_talwar
MVP
MVP

Create a new field in the script like this

(Year * 100) + Week as YearWeek

Anonymous
Not applicable
Author

can you explain more

sunny_talwar
MVP
MVP

Create a new field like this

(Year * 100) + Week as YearWeek

and then may be use this as a dimension  or use it for sorting purposes..

Anil_Babu_Samineni
MVP
MVP

I would call Year as Sorting option instead Week number this case

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

thanks , will try it now and update you

Aditya
Contributor
Contributor

Hi, 

But for the generic question - Can you sort a dimension by another? I ask this  because in my case, I'd like to show only the week number (51, 52,01, 02..) and not the year-week; this is just for aesthetics. Is there a way to accomplish this? Show week numbers but sort the week number of year week? It works perfectly when you sort a dimension on measure (like sales etc.)  but somehow it doesn't work when the expression is a dimension

Thanks,

Aditya