If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Joining two data items to create a ratio

Started by mohammed_hajat, 26 Nov 2009 08:16:07 AM

Previous topic - Next topic

mohammed_hajat

Right..

I spoke to Cognos Support and got informed Ratios as a standard is not part of Cognos.
so i worked it around and ended up with two data items.

DataitemA and DataitemB

what i want to do is show:

DataitemA : DataitemB

so the result will be for e.g 1 : 2

I have tried to create a third data item like so:

[dataitemA]+':'+[DataitemB]  <--- this errors?

what widget from the tool box is best to join two data items? and what is the syntax?

bgamoretti

#1
try with:

[dataitemA] || ':' || [DataitemB]


Regards,
Bryan

angela

It'll error if the data items are numeric and you're trying to concatenate it with a string because you're mixing data types.  Your choices are either to display all 3 items in one cell or to cast the numeric items as char.  Personally, I'd go with option 1 - unlock the report and in the place I want the ratio to show I'd drag in both data items and drag a text item between them for the colon.

mohammed_hajat