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

replace 0 with a string '>25'

Started by cognos05, 12 May 2015 12:26:01 PM

Previous topic - Next topic

cognos05

Hi,

I have a column which will have values from 0 to 25

If a value is 0 then I have a requirement to show '>25'

If I try to do this in if else, it says different data types cant be assigned.

Can anyone help me how to do this..

Thanks,
Nithya

BigChris

You're trying to mix strings and numerics. You might need to cast the values:

if([Value] < 25) then ('<25') else (cast([Value],varchar(3))

Give it a try...

cognos05

BigChris,

This is dimensional package and when I use the below code , I get a error
The 'cast' function is not supported in the context in which it is used.

Thanks,
Nithya

cognos810

Hello Nithya1224,
Apply data formatting to number, and set "0 value characters" to ">25".

-Cognos810