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

[Solved] RQP-DEF-0177 Inconsistent Datatype

Started by charon, 30 Aug 2012 04:07:10 AM

Previous topic - Next topic

charon

Hi all,

me again :D
Trying to create a new item/ calculation based on an integer(64), but besides int i might need some chars as well.
2 facts, lets call them [Revenue actual Year] and [Revenue last Year]
I want a new ratio fact, means [Revenue a.Y.] / [Revenue l.Y.] * 100

The challenge is, that a lot of these facts are 0 (nott null), and il get wrong or better to say not wanted results.
E.G. if [Revenue l. Y.] is 0, il get 0 Percent (x divided by zero) which brings out 0, in fact the ratio is quite big cause from 0 Revenue last year to some Revenue this year is a grow.
Apparently the issue was the mix of char and int. transforming the int into char (to_char) solved the issue.
Have no fact though, so still other ideas are welcome :)




My idea was, to use strings in a a 'if then' structure, like

if [Revenue l.Y.] = 0 and [Revenue a.Y] > 0 then 'There was no revenue last year, but a positive Revenue this year'
if [Revenue l.Y] > 0 and [Revenue a.Y] = 0 then 'There was no revenue this year but a positive Revenue last year'
blabla
else [Revenue LY]/[Revenue tY] * 100

Geting the error message: RQP-DEF-0177 Inconsistent Datatype epxecting char geting number
Using Cognos 10
Oracle (10 i think) DB

Is there a way around this?
cheerz :P
charon

blom0344

I would try to see it as another problem.. You can classify your data as  'existing' (where LY is not 0 ) and 'new' (where LY is 0)

Make a split on the calculation model and show [Revenue a.Y.] / [Revenue l.Y.] * 100
for existing and another metric for  'new'.

Showing ratio's for the 'new' category is pretty meaningless after all..

charon

oh, thats so nice about this forum...receiving all this wisdom  ;D
ty blom, gone use that.
:P