COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: vinch999 on 04 May 2011 03:59:30 AM

Title: x-axis label dates in alphabetical order (but unwanted)
Post by: vinch999 on 04 May 2011 03:59:30 AM
Hi,
I have a problem to display dates on a bar chart.
I have a data value every day.

I display the Day([Date]) and the monthName([Date]) on x-axis labels.
But the months are displayed in alphabetical order  >:(. I don't understand because I haven't this problem with other charts...

So I have April-----February-----March rather than February-----March------April

How to correct it?

Vinc

Title: Re: x-axis label dates in alphabetical order (but unwanted)
Post by: PRIT AMRIT on 04 May 2011 04:22:09 AM
 A quick solution :)

Create a data item called [Sort Month]:

Case  monthName([Date])
when 'Jan' then '1'
when 'Feb' then '2'
so on
when 'Dec' then '12'
end

Sort your x-axis on [Sort Month]

Hope it helps?

Thanks
Title: Re: x-axis label dates in alphabetical order (but unwanted)
Post by: vinch999 on 04 May 2011 04:42:40 AM
Thank you Prit , it works fine !  8)