COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognosun on 09 Nov 2012 04:14:30 AM

Title: Use value - Display value issues
Post by: cognosun on 09 Nov 2012 04:14:30 AM
Gurus,


Code   Name                      Sales

US       United States          50$
USA     UNITED STATES        60$

We have these 3 columns in our db...2 unique country codes and 2 country names ( kind of duplicate).

We need to display unique country names ( capital letter name)  in the value prompt drop down list.

We created a data item used upper function ( upper(countryname) in it and used this column as display value.

Problem is if user selects UNITED STATES , he need to get sales amount from 2 country codes ( US and USA), but here we are getting only one sale amount ( of 'United States', which we made as capital string using upper), but we need sale amount of 110$ for UNITED STATES.

If we use 'Use value' as country name or country code..still we are facing same problem.

The basic point itseems is....if we have 10 use values...then only 10 display values work....it's not possible to use 10 use values and 20 display values

Confused :-)
Title: Re: Use value - Display value issues
Post by: Gopinath on 09 Nov 2012 05:00:40 AM
Set [Country Name] as USE VALUE

and

change your filter expression to

upper([countryname]) = ?prompt_parameter?
Title: Re: Use value - Display value issues
Post by: cognosun on 09 Nov 2012 06:00:30 AM
Thanks Gopi.

That works :-)
Title: Re: Use value - Display value issues
Post by: Lynn on 09 Nov 2012 08:15:05 AM
Perhaps you are past the issue for the moment, but it seems to me that it could continue to plague future report development efforts unless you attempt to fix the root data quality problem.

There may also be performance implications from filtering on the name rather than the code.

Sometimes the quick and easy solution for the near term ends up being slower and more difficult in the long term.

Just my 2 cents.
Title: Re: Use value - Display value issues
Post by: navissar on 11 Nov 2012 08:30:59 AM
On top of what Lynn wrote: This is the sort of case where searching for a solution inside Cognos means not solving the issue.
The example you gave suggests poor data quality, with two country codes for the same country. This will become a festering swamp that will become increasingly diffcult to handle.
Also, filtering on indexed columns, as codes tend to be, is a lot better performance-wise.