COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gosoccer on 27 Jan 2017 05:50:47 AM

Title: Showing Month in the Edge of the Crosstab based on a Date
Post by: gosoccer on 27 Jan 2017 05:50:47 AM
Hi, :) :)

I have a crosstab and need to show the dates of Cars in different statuses on the left edge of the Crosstab. I have attached a mockup to
show what I'm trying to do. I only need to show the information based on the Jan, Feb, March, etc. I have a date that I can use for each
of the Statuses shown but how do I filter or change the dates to show the dates based on Jan, Feb, March rather than showing them day by
day. I have the Crosstab working but just need to show the months ONLY.

Thanks a lot for your time. Here is the attachment.
Title: Re: Showing Month in the Edge of the Crosstab based on a Date
Post by: MFGF on 27 Jan 2017 08:12:08 AM
Quote from: gosoccer on 27 Jan 2017 05:50:47 AM
Hi, :) :)

I have a crosstab and need to show the dates of Cars in different statuses on the left edge of the Crosstab. I have attached a mockup to
show what I'm trying to do. I only need to show the information based on the Jan, Feb, March, etc. I have a date that I can use for each
of the Statuses shown but how do I filter or change the dates to show the dates based on Jan, Feb, March rather than showing them day by
day. I have the Crosstab working but just need to show the months ONLY.

Thanks a lot for your time. Here is the attachment.

Dimensional or relational package?

MF.
Title: Re: Showing Month in the Edge of the Crosstab based on a Date
Post by: gosoccer on 27 Jan 2017 08:22:23 AM
Sorry, It's Relational unfortunately.
Title: Re: Showing Month in the Edge of the Crosstab based on a Date
Post by: BigChris on 27 Jan 2017 08:45:01 AM
Depending on your backend environment, you probably want something like month([YourDateField])
Title: Re: Showing Month in the Edge of the Crosstab based on a Date
Post by: gosoccer on 27 Jan 2017 09:05:53 AM
Hi, that worked and showing me 1 for the month since the date is in 2017-01-04 00:00:00.000
It also didn't show me all the counts that are related to 01 in my crosstab.

Thanks a lot!
Title: Re: Showing Month in the Edge of the Crosstab based on a Date
Post by: gosoccer on 27 Jan 2017 02:47:10 PM
Ok, I got it now. But now, it reduces my listing to a different set of counts. Still it shows January and the two Top Edge values but the counts are reduced. I'm curious if there is some sort of grouping related to the Data Item I'm using to have this code and dropping it as a part of the Left Edge of the Crossbar.  8)

case extract(month,[Order date])
when 1 then 'January'
when 2 then 'February'
when 3 then 'March'
when 4 then 'April'
when 5 then 'May'
when 6 then 'June'
when 7 then 'July'
when 8 then 'August'
when 9 then 'September'
when 10 then 'October'
when 11 then 'November'
when 12 then 'December'
else 'error'
end