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
Anil_Babu_Samineni

Can you please share sample

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anonymous
Not applicable
Author

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

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

Create a new field in the script like this

(Year * 100) + Week as YearWeek

Anonymous
Not applicable
Author

can you explain more

sunny_talwar

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

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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