can anyone tell me how to create a calculated column from 2 diff dataitems. I used case statement to create one,
dataitem 1,
case
when ([product_cd]='xyz') then ([product_type])
end
but I cudnt see this data item showing values for repeated data from any other column placed along with this ..
for exmaple if I place this with order_id in the report it shows blank for one of the order_id if has repeated values
order_id dataitem1
123 abc
123
can any one suggest why is this happening and wht shud be done to avoid this
Hi,
Could you explain more about order_id, product_cd and product_type?
Maybe order_id = 123 has more than one product_cd?? In this case it shows right values...
This case show only product_cd = 'xyz' - no other product_cd and no other product_type...
Hi,
the case statement is used to retrive tht particular product_cd as another dataitem and showing in the list report along with order_id data item.
May be I was not clear ....
using the product_cd, I'm creating a calculated dataitems for few particular values in it (like xyz).
but after I create this calculated dataitem when I show up in report with order_id for repeated values of order_id the dataitem is null for one of them...
It may help you, try this..
change the Aggreagate function to none...which will prevents rollup.
Quote from: kudikilla on 21 Jul 2008 03:22:05 PM
can anyone tell me how to create a calculated column from 2 diff dataitems. I used case statement to create one,
dataitem 1,
case
when ([product_cd]='xyz') then ([product_type])
end
but I cudnt see this data item showing values for repeated data from any other column placed along with this ..
for exmaple if I place this with order_id in the report it shows blank for one of the order_id if has repeated values
order_id dataitem1
123 abc
123
can any one suggest why is this happening and wht shud be done to avoid this
Hi,
Try this first:
Add product_cd to list and tell us what display cognos viewer...
order_id dataitem1 product_cd
123 abc xyz
123 <null> ??? - which value is displaying?
Have you applied any filters in query?
Data items are from one or more tables?
What kind of joins are between tables containing (order_id, dataitem1, product_cd) - if more than one table is used?