Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Displaying Months in a specfic order

Hi,

I have a requirement wherein the following aspects will have to be covered in the chart Sales.

1.The chart must show data only for 3 months

2.By default the three months appearing in the chart must current month-1,current month-2 and current month-3

3.When the user selects a month say the user selects year 2012 and month feb,then the chart must display sales for feb(selected month),jan(selected month-1),dec(selected month-2)

Can anyone  please help me accomplish all the above requirements without making any changes to the script.

Please refer to the attachment

7 Replies
er_mohit
Master II
Master II

See the attached application

Not applicable
Author

Hi,

The attached application is a bar chart and the one I have attached is a pivot,the approach you have suggested isa not working.can you please make the changes on the attachment i have put up

tresesco
MVP
MVP

Month in your sample is not a date field, may be that is why it is not working. Load your month field using Month() function like:

Month(Date) as Month

Or,

Date(Date,'MMM') as Month

Not applicable
Author

I would want to achieve the essentials without making any changes to the scripting.. Is that not possible?

Thanks & Regards

Anushree Shetty,

+91 9535028666

sandeepprasad_j
Creator
Creator

Hi,

Attaching you the qvw ...

Juss reload it

Hope it helps

Sandeep.

tresesco
MVP
MVP

I would not say 'impossible'. But as you might know that if your month/date fields are strings, the comparison would be string comparison which is totally different from what is expected. And you would face this problem everywhere in your application where comparison comes. Hence, it is always recommended to use the proper date functions in the script. if you are afraid of making changes in many places, you can even try a dual() function for associating them to a numeric value. Or, make the changes in the master calendar (if you have one).

Anonymous
Not applicable
Author

In the sort

clik on Month un check all the sort types and  enable or check on Load Order as original