COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Nandini.t on 17 Nov 2011 06:14:07 AM

Title: **** Too Urgent **** String dynamic column
Post by: Nandini.t on 17 Nov 2011 06:14:07 AM
Hi..

I have 2 data items with product codes and section codes . i have a 7 seperate conditions on product code and section codes. how to calculate .
for example if we cosider content of product codes as 'a1','a2','a3' etc  and section code as 'b1','b2','b3, etc and we have some x,y,z columns which we should calculate based on product codes and section codes that is if x =(Product Code = "a1" , Section Codes except "b1" ) ,
y= (Product Code = "a1",  Section Code= "b1" ),
z= (Product Code = "a1",  Section Code= "b1" ,"b2","b3"),
                              '
                              '

                            etc
in the same query. how to do this in the report.


i tried this way but no use not working giving error

calculated data item ,x=[Product Code]='a1' and [Section Type Code]<>'b1'
and put filter on it as x='1'(for true condition)
but not working.
so please guide me on this..







Title: Re: **** Too Urgent **** String dynamic column
Post by: HalfBloodPrince on 17 Nov 2011 06:44:32 AM
No totally clear about Condition  but try this and let me know

IF([Product Code]='a1' and [Section Type Code]<>'b1') then
(1)
else
(0)

now put filter on it. x=1
Title: Re: **** Too Urgent **** String dynamic column
Post by: pricter on 17 Nov 2011 06:48:36 AM
HalfBloodPrince I think by mistake you include the "x=" in your expression that will give an error
the right one should be the following
IF([Product Code]='a1' and [Section Type Code]<>'b1') then
(1)
else
(0)

PS: All the credits for the solution goes to  HalfBloodPrince
Title: Re: **** Too Urgent **** String dynamic column
Post by: HalfBloodPrince on 17 Nov 2011 06:53:14 AM
Thanks Buddy !!!!! :D
Title: Re: **** Too Urgent **** String dynamic column
Post by: Nandini.t on 18 Nov 2011 12:23:44 AM
It worked..
Thank u HalfBloodPrince..... :) :)