COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Priyanka141190 on 08 Apr 2015 09:55:35 AM

Title: Cognos-If statement-Issue with the measure
Post by: Priyanka141190 on 08 Apr 2015 09:55:35 AM
Hi,
I am creating a report in cognos Report Studio 10,using an if statement.
For display of a Column chart.
On X-Axis i am using an if statement as follows
if (?Category?='Valve Material') then ([Relational Model].[Catalog Elements].[Valve Material])
else
(if (?Category?='Valve Trim Characteristic') then ([Relational Model].[Catalog Elements].[Valve Trim Characteristic])
else  ([Relational Model].[Catalog Elements].[Valve Rating]))
and year in the series
and in measure i have given Sales Quantity.

which resulted me a warning
RQP-DEF-0578 A grand total will be returned for measure 'Component Sales Qty' in expression 'total([Presentation Layer].[Measure].[Component Sales Qty]

and its displaying the total value of sales quantity for all the inputs.

Can anyone please suggest what are changes to be done on the maesure to get the individual sales quantity.
Title: Re: Cognos-If statement-Issue with the measure
Post by: navissar on 08 Apr 2015 02:24:02 PM
Try this as your x axis expression:#'[Relational Model].[Catalog Elements].['+prompt('Category', 'token') +' ]'#

Let us know how it worked.
Title: Re: Cognos-If statement-Issue with the measure
Post by: AM on 09 Apr 2015 02:22:44 AM
try sticking a crosstab over the same query - can help you troubleshooting it
Title: Re: Cognos-If statement-Issue with the measure
Post by: ravimahazan84 on 09 Apr 2015 11:29:17 PM
Try to use paramvalue instead of ?category? hope it will work.