Skip to main content
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Sorting months in a 12 month period

Hi all,

I have created an app that has a weekly and monthly breakdown which role over a current and previous 12 months period. My weekly data populates every time I enter a new week, whereas the monthly data populates every time I enter a new month. As  a result of this, my weeks will contain dates( based off of the current month we are in Nov-2021) , up until the 28th of November. However, my month is only up until the October 2021 since November isn't complete. The issue I am having is I can't sort my month properly by using max(MonthStartDate) because it puts November first which isn't correct in this case since the two Novembers in the graph below refer to 2020 and 2019. How can I sort the data?

I have tried sorting by using  Monthstart(max(FR_MonthStartDate),-1) but that doesn't work. Below is how I have formulated my RYTD period. 



Thanks for the help, much appreciated 🙂


2 Replies

Perhaps consider using a dimension such as MonthName(Date) which results in e.g. "Nov 2021" rather than "Nov". Standard ascending sort will then get you the correct order and Nov 2021 will be separate from Nov 2020.

Contributor III
Contributor III

Hi @Or , unfortunately I need to display it the way as seen above, so the solution isn't quite what I am looking for, but thanks for the reply.