Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have another thing I am stuck with!!!
I am creating a qlikview report for records returned within a certain period. I am using a standard SQL smalldatetime field named 'DateReturned' and would like to create a new list box which shows this data grouped into the year and month, for example, the values 03/03/2010 and 02/03/2010 I would like to appear as 'March 2010' (or something similar).
I would like to also be able to sort this list box in descending order so that it keeps the sorting integrity of the dates, for example the first six values in this list box would be:
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
Can anyone help?
Thanks in advance,
Chris
Yes, you can either add this to your script:
Date(MakeDate(Year(DateReturned), Month(DateReturned)), 'MMM-YYYY') as MonthYearFormatted
Or you can use that as a Calculated Dimension in a chart if you want to see what it looks like without reloading.
Are you using a Calendar in your application? Because if you are, you can add a field that just holds the first day of the month for each date, and you can use that in your application. In my calendar file, I put:
Date(MakeDate(Year(Date), Month(Date)), 'MMM-YYYY') as MonthYearFormatted
Hi Paul,
I don't have a calendar in my application as I have forgot how to create one! I went on a course 3 years ago and have only just been given the opportunity to use the application!!
Any ideas on how to create the calendar off my field named DateReturned?
Thanks,
Chris
Hello Chris,
Check among many others this post of today. There are a lot of good examples on how to make a calendar and some tips to customize it.
Yes, you can either add this to your script:
Date(MakeDate(Year(DateReturned), Month(DateReturned)), 'MMM-YYYY') as MonthYearFormatted
Or you can use that as a Calculated Dimension in a chart if you want to see what it looks like without reloading.