Cognos expression result is not being displayed in report

Hi,

In the crosstab report I am using one of the expression as

if([Type]= 'M') then('Mag zines.') else('book')

so it shows the count of each for a store.. But if that store does not have magzines  for a time period(like Quarter)  then it should display '0' but it is not pulling that column at all.

It is just  pulling book and displaying its numbers.
new_perl_userAsked:
Who is Participating?
 
SNeupaneConnect With a Mentor Commented:
then use a if else statement to check for null and if null put '0' value.
0
 
SNeupaneCommented:
It could be because of null suppression that is automatic in crosstab.
Change expression of your measure to coalesce () or nullif or (if null then 0 else measure) etc... expression.
Use the one that works according to your database.
0
 
new_perl_userAuthor Commented:
the [Type] data item I am using above is text  so when I am using coalesce () it errors out.

If possible can you please let me know how to use nullif and others with an example of condition/expression
0
 
new_perl_userAuthor Commented:
how doe we check for a null from the above expression

if([Type]= 'M') then('Mag zines.') else('book')
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.