• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 569
  • Last Modified:

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.
0
new_perl_user
Asked:
new_perl_user
  • 2
  • 2
1 Solution
 
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
 
SNeupaneCommented:
then use a if else statement to check for null and if null put '0' value.
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now