Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
narayanaqlik
Creator
Creator

How to sort Month-Year date filed in trend chart in Qliksense?

Hi All,

I have a requirement like show the rolling count for last 12 Months.

here i have date field CreateDate, 'YYYY/MM/DD' format

and i have created date Filed like

Month(CreateDate)&'-'& Date(CreateDate,'YY') as Month_Year,

for last 12 months i ahve created on flg like 

if(CreateDate <= MonthStart(Today(0),-12),1,0) as Last12M_Flag,

That is my script , logic for getting last 12 month data 

here my Dimension  is  Month_Year but here it is not sorting properly, it is displaying Dec-19 first value, May-19, Mar-19,Jun-19, Oct-19, Nov-19, Sept-19 so it is displaying in this way and data is also rolling in this way but this is not correct 

 

Please guide me here how can i calculate last 12 months cumulative count in scripting side.

 

3 Replies
sunny_talwar

Create Month_Year like this instead

Date(MonthStart(CreateDate),'MMM-YY') as Month_Year,
narayanaqlik
Creator
Creator
Author

Thanks Sunny for you good reply.

That's ok, but here my main question is hoe to create flag for last 12 months rolling  count 

so that i can give the expression Sum of Flag and dimension like as you mentioned

sunny_talwar

The heading of your question says how to sort Month_Year? How is your main question is hoe to create flag for last 12 months rolling  count? lol