COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: en1 on 25 Sep 2015 02:51:48 AM

Title: null values
Post by: en1 on 25 Sep 2015 02:51:48 AM
Hi!
It is possible show null values in crosstab without case is null ... in expression?
Title: Re: null values
Post by: Lynn on 25 Sep 2015 03:31:24 AM
Quote from: en1 on 25 Sep 2015 02:51:48 AM
Hi!
It is possible show null values in crosstab without case is null ... in expression?

I don't understand the question. You can set the data format and specify missing values characters. Is that what you're after?
Title: Re: null values
Post by: en1 on 27 Sep 2015 01:33:33 PM
when no value for intersection, i need show 0. in this case i use formula like this
case when total (...) is null then 0 else total (...) end
but it reduce performance .
Title: Re: null values
Post by: clamus17 on 27 Sep 2015 10:14:12 PM
You can try setting the missing value characters to 0 in the data format property just like Lynn stated.
Title: Re: null values
Post by: en1 on 28 Sep 2015 04:55:45 AM
members for this values invisible
Title: Re: null values
Post by: MFGF on 28 Sep 2015 05:06:00 AM
Quote from: en1 on 28 Sep 2015 04:55:45 AM
members for this values invisible

I can't make any sense of this post. Can you explain what you mean?

MF.
Title: Re: null values
Post by: en1 on 28 Sep 2015 06:41:39 AM
when a column has no data, it is being suppressed
Title: Re: null values
Post by: colt on 28 Sep 2015 07:15:00 AM
Coalesce might help you. coalesce(measure1,0) : if measure1 is NULL then it gets value 0.
Title: Re: null values
Post by: Lynn on 28 Sep 2015 08:22:03 AM
Quote from: en1 on 28 Sep 2015 04:55:45 AM
members for this values invisible

Quote from: en1 on 28 Sep 2015 06:41:39 AM
when a column has no data, it is being suppressed

Wow, poster of very few words.

Is your source relational by chance? If so you'd have gotten a better answer initially if you'd pointed that out.
Title: Re: null values
Post by: en1 on 28 Sep 2015 08:53:16 AM
Thx for your replies! package is dimensional.
i have try coleasce(,) and it surprisingly not work   :o
case is null work ok? but i assume it may reduce performance...
Title: Re: null values
Post by: Lynn on 28 Sep 2015 09:23:43 AM
Quote from: en1 on 28 Sep 2015 08:53:16 AM
Thx for your replies! package is dimensional.
i have try coleasce(,) and it surprisingly not work   :o
case is null work ok? but i assume it may reduce performance...

Now I'm really confused. If the members aren't appearing because you have suppression turned on but you want them to be shown then just turn off the suppression and set the missing value character using the data format property.

Or am I still missing what the issue is?
Title: Re: null values
Post by: en1 on 28 Sep 2015 09:29:21 AM
supression is off but members with null value for them are supressed.
it is main problem of this topic. second is that coleasce(,) not work.
some expert tell me that its standart cognos problems and i should use case is null..
Title: Re: null values
Post by: Lynn on 28 Sep 2015 10:25:21 AM
Quote from: en1 on 28 Sep 2015 09:29:21 AM
supression is off but members with null value for them are supressed.
it is main problem of this topic. second is that coleasce(,) not work.
some expert tell me that its standart cognos problems and i should use case is null..

Ok, then your source must be DMR dimensional?
Title: Re: null values
Post by: en1 on 28 Sep 2015 10:27:17 AM
yes
Title: Re: null values
Post by: Lynn on 28 Sep 2015 10:41:42 AM
The behavior you see is due to absence of data in your relational database. A true OLAP source would always show all members in the set regardless of whether there are metrics for it or not.

Imagine you have a query that returns NO ROWS but you want to perform a substring on a particular column....it makes no sense because you can't perform that operation when there isn't anything in the result set to act upon. In your case you are getting data only where an intersection exists in the source and getting nothing for intersections where there are no rows to be found. Thus, you can't do coalesce. There is simply no row in your source for the intersection in question. You'd have to actually have a row returned in the result set upon which you could then specify a coalesce.

I'm not sure I agree with the advice your expert offered. I'd suggest you explore a two-query approach. First query retrieves all the members you want to show regardless of whether there are metrics for them or not. The second query would be what you already have. Next, outer-join the two queries to create a third, making sure you populate members based on the first query and then all other elements based on the second query.

Finally, point your crosstab at the third query and set the missing values property as desired. You could do the coalesce in the third query as an alternative to the data format property change.
Title: Re: null values
Post by: en1 on 28 Sep 2015 10:54:25 AM
Thanks!!