COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: deepak2k2 on 09 Nov 2010 10:05:25 AM

Title: Help in Filters
Post by: deepak2k2 on 09 Nov 2010 10:05:25 AM
Hi,

I've a scenario to create a list with filters.  I need a create a measure in such a way that Revenue of filtered item/total Revenue.

Ex:  Using value prompt, I've chosen India.  Then I need to calculate the measure (%) as
Revenue (India)/Revenue (Overall).

How to find the overall revenue in my filtered list?  Which function will give the overall revenue?
Title: Re: Help in Filters
Post by: rockytopmark on 09 Nov 2010 10:16:47 AM
You could try something like:

total(If ([Country] = ?pCountryPrompt?) then ([Revenue]) else (0) for report)/total([Revenue] for report)
Title: Re: Help in Filters
Post by: deepak2k2 on 10 Nov 2010 03:47:13 AM
Thanks for your reply.

I'm getting the below error message when I use the code "Total([Revenue] for report)"

Error:  "The 'For Report' clause is not supported with sibling valueSets or edgeGroups."
Title: Re: Help in Filters
Post by: yattishr on 18 Jan 2011 04:20:20 AM
Has anyone managed to find a resolution to this issue as I am experiencing a similar problem
I am also getting the same error message as:
"Error:  "The 'For Report' clause is not supported with sibling valueSets or edgeGroups."

Thanks,
Title: Re: Help in Filters
Post by: ksr on 18 Jan 2011 07:45:49 AM
Hi,

I think you are using dimensional package. In such case use level in the expression instead of Hierarchy

and remove the filter line on country from the filter and dont remove the prompt.

take a query calculation and add the following expression

total(if([country]=?cParameter?) then ([revenue]) else (0) for report)/total([revenue] for report)

note: As I told you, the [country] in the above expression should be level in the hierarchy

even if you get error, please describe your problem in detail...

regards
KSR