COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: sadiqndl on 26 Feb 2014 03:30:15 AM

Title: specific output for the result
Post by: sadiqndl on 26 Feb 2014 03:30:15 AM
Hi everyone,

I have a Situation where Iam using QUARTER(from time) and REVENUE(from sales fact) columns.
Now when I run the report the result will be as per Quarter-wise revenues will be displayed like
Q1     230
Q2     450
Q3     5800
Q4     58966

Now I want the Report to be displayed as
One         230
Two         450
Three      5800
Three      58966.

Any one please help........
Thanks in advance
Title: Re: specific output for the result
Post by: hittony on 26 Feb 2014 03:35:43 AM
Hi, a case when can't do it ?
Title: Re: specific output for the result
Post by: sadiqndl on 26 Feb 2014 03:38:24 AM
Can U please Explain step by step procedure, Because i used case condition and run the case without any errors but im getting confused where to use the case condtion in properties pane
Title: Re: specific output for the result
Post by: mitwa on 26 Feb 2014 04:03:52 AM
Hi,

just create data item instead of quarters then assign like [query][quarter]='Q1' then 'one' and so on...
Title: Re: specific output for the result
Post by: sadiqndl on 26 Feb 2014 04:43:12 AM
Ya I did that but I need to change the output data not style like background colour, font color like that.....


did u get it?
Title: Re: specific output for the result
Post by: mitwa on 26 Feb 2014 05:09:05 AM
write string variable as case when ([Query2].[quarter]='Q1'  then 'A' ad so on..
lik tht u can give different colrs for different qrts
Title: Re: specific output for the result
Post by: sadiqndl on 26 Feb 2014 06:17:24 AM
No its not the way, through this way we can change the display of the data but not result.

The CORRECT ONE is use QUERY CALCULATION. just now got this answer from Cognos Developers Forum and it worked.


Thanks for the effort............
Title: Re: specific output for the result
Post by: sadiqndl on 27 Feb 2014 06:49:22 AM
Again one more work with this same task.
I want in crosstab report(on measurable values)......


Can anyone help please.............?
Title: Re: specific output for the result
Post by: MFGF on 27 Feb 2014 06:57:48 AM
Quote from: sadiqndl on 27 Feb 2014 06:49:22 AM
Again one more work with this same task.
I want in crosstab report(on measurable values)......


Can anyone help please.............?

Can you explain what you mean? If you are using a crosstab, your query calculation will go in the row headings area and your measure will go in the measures area. Is this what you mean?

MF.
Title: Re: specific output for the result
Post by: sadiqndl on 27 Feb 2014 07:07:12 AM
I have a crosstab report in which im using Revenue as MEASURABLE value........
In this when i run the report, I will get some values in middle, right.....

I want them to be replaced with any string values........


For eg., If i get the revenue as 111410, I want this value to be replaced as "OK I GOT VALUE"
I apllied CASE condiotion, if else then  tried with Query calculation
I got the answer with list report but i want with crosstab
Title: Re: specific output for the result
Post by: MFGF on 27 Feb 2014 07:26:07 AM
What you are trying to achieve is difficult in a crosstab. Cells in the middle are designed to show measure values only. You can work around it with some effort, but it's a bit messy.

Take a look here:

http://www.cognoise.com/index.php/topic,21666.msg65939.html#msg65939

MF.
Title: Re: specific output for the result
Post by: sadiqndl on 27 Feb 2014 07:35:55 AM
Hi this approach may help me a bit, let me try and
And at the same time I can easily see he is Using text values as measures but
I am using measurable values only but output as string.

So I am think we should convert this numeric value to string then apply it in Query Calculation. will this work?
HOW?
Or any other approach?
Title: Re: specific output for the result
Post by: Lynn on 27 Feb 2014 10:35:59 AM
He is using a numeric measure, such as cellValue() = 1, and then displaying a string, such as 'Bulb'. What makes you think you need to covert your measure to a string?

Based on the example in your earlier post you'd want revenue as your measure and then a report expression something like:
when cellValue() = 111410 then 'OK I GOT VALUE'

I would imagine you don't want to reference every possible revenue figure in your case statement, so perhaps a range of values is the report expression you would be creating.