Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Cognos expression result  is not being displayed in report

Posted on 2011-09-09
4
Medium Priority
?
567 Views
Last Modified: 2012-05-12
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
Comment
Question by:new_perl_user
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 8

Expert Comment

by:SNeupane
ID: 36511638
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
 

Author Comment

by:new_perl_user
ID: 36512672
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
 
LVL 8

Accepted Solution

by:
SNeupane earned 2000 total points
ID: 36512868
then use a if else statement to check for null and if null put '0' value.
0
 

Author Comment

by:new_perl_user
ID: 36513157
how doe we check for a null from the above expression

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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question