Hi guys, I need some help. I have a month field that is made up of numbers. My client wants to see the filter by month name.
I made a new query using Case Month = 1 Then 'Jan' and so on.
But when I go to Cognos Analytics and ask to sort, it sorts by Alphabetical order and not by month number.
Is there anything that can be done to sort by month number in this case?
I'm using Cognos version 11.0.11.
Yes.
What are you trying to sort. Is this a list, a crosstab, a value prompt,...?
One list. I would need it to sort by month value (1,2,3,4,5) but that the name of the month appear (January, February, March, April, May).
In short, I wanted it to be sorted by the number of months, but the name of the month would appear in the list.
Quote from: shark1986 on 28 Mar 2022 04:04:37 PM
One list. I would need it to sort by month value (1,2,3,4,5) but that the name of the month appear (January, February, March, April, May).
In short, I wanted it to be sorted by the number of months, but the name of the month would appear in the list.
Hi,
The trick here is to include the Month Number in the query that drives the List, but don't actually show the Month Number in the List. You will probably need to add the Month Number as a property of the List object to ensure that it doesn't get ignored by the query engine - to do this, select the List object in your report, open the Properties pane, find the "Properties" property, and check the Month Number item. In your Sort, choose to sort on the Month Number item, and you should be fine.
Cheers!
MF.