Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
subbareddykm
Creator II
Creator II

Rolling Week Sorting in Qlik

Hi All , I have a issue in sorting week field in chart level like line and bar.

For example i have chart with 12 rolling weeks, if i dont select my sorting is working file because all the weeks are in 2019 so no issue in sorting but if select 8 week of 2019 , it has to show from 2018 50 week to 8th week of 2019 then sorting is not working if i create unique number also.

 

Can anyone try and tell me the solution for this to solve on my sample data

 

Dim: Week

Expression: Sum(Sales)

Chart : Bar or Line

 

Thank you in advance.

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Sort order on week using expression  =min({<Week>}[Week Sorting])

image.png

View solution in original post

9 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, Can you share sample app which shows your issue.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Vegar
MVP
MVP

Try Sum( {<Year, Week, [Week Sorting]={">=$(=MAX([Week sorting])-12) < $(=MAX([Week sorting]))"}
>}
Sales)
subbareddykm
Creator II
Creator II
Author

App is attached in this. Here is simple example it shows that issue
subbareddykm
Creator II
Creator II
Author

 
subbareddykm
Creator II
Creator II
Author

Not working Vegar

tresesco
MVP
MVP

Try to share your sample app (not screen shot) where we can check the issue and help fix it for you.
Vegar
MVP
MVP

I had a typo "sorting" should be "Sorting" (typing on my mobile). See attached application.

 

 

Sum( {<
   Year, 
   Week, 
   [Week Sorting]={">=$(=MAX([Week Sorting])-12)< $(=MAX([Week Sorting]))"}
>}
Sales)

 

12months figures over Year and Month12months figures over Year and Month

subbareddykm
Creator II
Creator II
Author

Hi Tresesco,

 

Thanks for the response, file is attached

Vegar
MVP
MVP

Sort order on week using expression  =min({<Week>}[Week Sorting])

image.png