COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognos74 on 11 Nov 2016 02:41:36 PM

Title: How to add comment to each measure in the Cross Tab report
Post by: cognos74 on 11 Nov 2016 02:41:36 PM
Hi,

I have cross tab with rows and columns.

rows are name, number, item name
I have only one column which is date and one measure.  measures are like 1,2,5,7,3 etc..
and I have one more data item in my query that is Comment Data Item.
so I have to add comment to each measure.  either next to measure or bottom of each measure.  not sure how to achieve this.  can anyone please help me.

Thanks,
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: BigChris on 14 Nov 2016 04:21:35 AM
I don't think you'll be able to do that in a cross tab, but people with bigger brains than mine might be able to suggest something...
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: bdbits on 14 Nov 2016 09:58:58 AM
Try dragging your comment item underneath the date columns (not on the intersection). If that doesn't work, it may be due to it not being a number/measure (is this relational or dimensional data?). In which case reply back, it might get a bit more complicated, but should still be possible.
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: BigChris on 14 Nov 2016 10:11:00 AM
I read the requirement as a comment for each intersection...apologies if i misread that.
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: cognos74 on 14 Nov 2016 12:20:43 PM
dragging comment column underneath the date column is not working properly:
attached my sample screen shot:

in my report some of the measures have the comments so how can I show them for example 2016-11-02 Exudate type has measure 4 and I have some comments for that measure in the measure data item and same like for 2016-11-03 Depth has some comment  so I need to show comment along with 0 measure for Depth.  For other measure if they do not have any comments so need to show only measures.
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: bdbits on 15 Nov 2016 09:51:46 AM
Does this help?

http://www-01.ibm.com/support/docview.wss?uid=swg21454433 (http://www-01.ibm.com/support/docview.wss?uid=swg21454433)

Note that your Report Expression could be any valid expression, and does not have to relate to the measure, e.g. reference the comment you want.
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: cognos74 on 18 Nov 2016 08:54:30 AM
HI,

This issues is not yet resolved so I am still looking for the help . Please can anyone help me.

I did add my sample report attachment in that attachment where we have the numbers like 1,2 etc.. instead of that I have to add the comment because case managers does not know the numbers, when the nurse take the assessment they put the wound dimensions like 1,2 etc along with that they enter some comments also.  so my requirement is instead of numbers in crosstab measures I have to show the comments it can be anything I can not hard code that because I have no idea for which wound what they enter in comments column.

in this dimensions 1,2 etc..(measures Column)  is one column  and comment is another column which is the alpha numeric column (ex: 5x7 Underming,  not healed, >=25 percent etc..)

Thanks,


Title: Re: How to add comment to each measure in the Cross Tab report
Post by: Lynn on 18 Nov 2016 09:06:36 AM
Quote from: bdbits on 15 Nov 2016 09:51:46 AM
Does this help?

http://www-01.ibm.com/support/docview.wss?uid=swg21454433 (http://www-01.ibm.com/support/docview.wss?uid=swg21454433)

Note that your Report Expression could be any valid expression, and does not have to relate to the measure, e.g. reference the comment you want.
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: cognos74 on 18 Nov 2016 09:22:01 AM
Hi Lynn,

Thank you.  that post does not help in this case. because in the case statement I can not hard cord the comments since I don't know in which case what comment they write no one knows.  So I have to pull the comment column in the measure place instead of hard coding anything.  Comment column data type is Character Length 16

I have to write something like this to get the comment:
case
when [Parm Value] = 'Size' and [Recorded Value] = 0 then [Comment]
when [Parm Value] = 'Depth' and [Recorded Value] = 2 then [Comment]
else
[Recorded Value]
end

but I am getting Data Type error :
Please help me out..
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: Lynn on 18 Nov 2016 09:35:06 AM
The first line in the article explains why your approach is not viable: "Data items that hold string values can not be used as measures in a crosstab".

The only technique I am aware of to do this, described in the article bdbits provided, is when there are a limited range of possible values upon which you can base a report expression.

You might consider alternative layout options, such as a repeater table.
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: cognos74 on 18 Nov 2016 09:43:44 AM
Hi,

Thanks Lynn and bdbits for trying to help. 

bdbits it is relational data.  any other ideas how to get it ..
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: MFGF on 18 Nov 2016 10:00:44 AM
Quote from: cognos74 on 18 Nov 2016 09:43:44 AM
Hi,

Thanks Lynn and bdbits for trying to help. 

bdbits it is relational data.  any other ideas how to get it ..

It seems to me you're trying to find ways to make the product do something it's not designed to accommodate. Lynn made a good suggestion - investigate a different presentation method (such as a repeater table) rather than a crosstab. You're not going to be able to display comments from a relational table in the measures cells of a crosstab, no matter how many ways you ask how it can be done.

Cheers!

MF.
Title: Re: How to add comment to each measure in the Cross Tab report
Post by: bdbits on 18 Nov 2016 11:22:48 AM
I agree, I would look for another way to present the data. Crosstabs are very useful but finicky things.