COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: KEKeogh on 13 Apr 2010 03:47:31 PM

Title: Problem with CASE Statement
Post by: KEKeogh on 13 Apr 2010 03:47:31 PM
Everything I see says I'm doing this right but I keep getting dashes (--) in the column.

I have the following CASE Statement.

CASE [DSR].[VIEW_APPLN_AVAIL].[APPLICATION_NAME]
WHEN 'ADR' THEN 'Khurana'
WHEN 'Aegon Checkfree' THEN 'Keller'
WHEN 'Avg Cost' THEN 'Khurana'
WHEN 'AWD' THEN 'Khurana'
ELSE 'Unassigned'
END

Aggregate Function = Automatic
Rollup Aggregate Function = Calculated
Column Format = Text

Any help is appreciated.

Kathie
Title: Re: Problem with CASE Statement
Post by: CognosPaul on 13 Apr 2010 03:57:54 PM
Aggregate functions will only work with numeric data types, so the rollup aggregate function should be set to automatic or none.

Is this a list or a crosstab?
Title: Re: Problem with CASE Statement
Post by: KEKeogh on 13 Apr 2010 04:47:58 PM
Sorry I forgot that, it's a crosstab.

Changing the Rollup didn't seem to work either.  Now instead of getting the dashes, each different THEN option came out as a column header.
Title: Re: Problem with CASE Statement
Post by: CognosPaul on 13 Apr 2010 04:59:34 PM
This is probably your problem. Are you trying to put this data item into the measures section?

Put it in either the columns or the rows and it should work fine.
Title: Re: Problem with CASE Statement
Post by: KEKeogh on 14 Apr 2010 09:20:31 AM
I'm putting it in between the Column headings but still not working.

Title: Re: Problem with CASE Statement
Post by: CognosPaul on 19 Apr 2010 01:59:42 AM
what happens when you put it in the columns? Is it still giving you the '--'? What happens if you put it into a list?
Title: Re: Problem with CASE Statement
Post by: KEKeogh on 12 May 2010 03:12:38 PM
Not quite sure how I did it but it finally worked.