Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
snehamahaveer
Creator
Creator

Overlay 2 rolling 12 month charts in one

Hi All,

My latest requirement is to create a chart that shows two rolling 12 month as a comparison of one another.

I am able to show them separately as 24 month period. However, when I overlay them by month as dimension I am unable to sort them based on the latest month values. The chart automatically sorts from Jan - Dec or Dec-Jan and not by the latest month to the last 12 months.

Can someone please help with this

Thanks in advance.!

25 Replies
sunny_talwar

What is MonthCount field here? Month_No? You expression uses MonthCount, but I don't see any field with that name?

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi Sneha,

the file you attached doesn't contain a Date field so this will be difficult to fix in that!

Try max(Month_Conseq_No) instead

Marcus

sunny_talwar

May be this as your sort expression

Month(Date#(Only({1}Month), 'MMM'))

Capture.PNG

snehamahaveer
Creator
Creator
Author

Hi Sunny,

MonthCount  is the a consecutive count of Month over all years. So in 2015 Aug its 1, and Jan 2016 its 6 and so on.

sunny_talwar

Did my response below makes sense?

snehamahaveer
Creator
Creator
Author

Hi Sunny,


Thanks, however this is not dynamic based on the selections made for year/month.

=max(Month_Conseq_No)

The above works fine on Dummy table - however, when I use it in my app it does the same as date. Jun first then Jan..Dec.

snehamahaveer
Creator
Creator
Author

Hi Marcus,

max(Month_Conseq_No)

The above works fine on Dummy table - however, when I use it in my app it does the same as date. Jun first then Jan..Dec.

Any thoughts, on what needs to change in my app to accommodate this?

sunny_talwar

Where is =max(Month_Conseq_No) coming from? I asked you to use Month(Date#(Only({1}Month), 'MMM'))

snehamahaveer
Creator
Creator
Author

Hi Sunny,

I did try your expression and as I said its not dynamic. It displays data from Jan - Dec and Dec- Jan. It's not sorting it based on the month selected. That's why I told about the one that works on test file but not on my original data set.

sunny_talwar

I got it... so for example if you select March, you want the sorting to begin at March, Apr... Dec, Jan, Feb?