COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: tequila on 26 Mar 2014 09:57:00 AM

Title: How can I set thi conditional?
Post by: tequila on 26 Mar 2014 09:57:00 AM
Hi all,

I have a simply list with Processgroup, Process and Status.
Processgroup can contain one or multiple process and the Status give values 0,1,3,4... back.

How can I realize this.

Status value 0= Oki  and 1,2,3... =error

When one process of the processgroup 'error' then all other process in this processgroup are 'error'  in the Status.

I have try with "if (....Status>'0') then ('error') else ('OKI')" but it give only the Status of one Process back. How do I make the condition - when one process of the processgroup is error then all process of this processgroup are error?

thnx.

Processgroup  I            Process             I      Status               I           Status   
                     I                                    I                              I
Mountainbike  I            A                      I          0                  I         errror
                     I            B                      I          1                  I         error
                     I            C                      I          2                  I         error
                     I            D                      I          0                  I         error
                     I                                    I                              I
Camping        I             E                      I          0                  I         Oki
Sport             I             H                     I          0                  I         OKi


Title: Re: How can I set thi conditional?
Post by: navissar on 26 Mar 2014 03:23:38 PM
If this is over relational, try totaling Status for ProcessGroup.
Title: Re: How can I set thi conditional?
Post by: Waydin2296 on 27 Mar 2014 08:20:11 PM
Quote from: tequila on 26 Mar 2014 09:57:00 AM
I have a simply list with Processgroup, Process and Status.
Processgroup can contain one or multiple process and the Status give values 0,1,3,4... back.
Status value 0= Oki  and 1,2,3... =error
When one process of the processgroup 'error' then all other process in this processgroup are 'error'  in the Status.

Can you try creating a data item
Maximum(status for Processgroup, Process)

Then you can create an expression if (max status <> 0 )THEN(error)ELSE(OKI)

Title: Re: How can I set thi conditional?
Post by: tequila on 28 Mar 2014 07:05:01 AM
Hi,

I create two Data Items

Data Item (StatusCheck)

Maximum ([PROZESSSTEUERUNG].[ADMPROZESSE].[STATUS] for [PROZESSSTEUERUNG].[ADMPROZESSE].[PROZESSGRUPPE];[PROZESSSTEUERUNG].[ADMPROZESSE].[PROZESS])

Data Item  (Feedback)

IF (Maximum ([StatusCheck])>0) then ('error') else ('OKI')

but it don't really work. It show only single 'error' and not 'overall error' when one process of Processgroup have error values.

It it relational Package.

thnx
Title: Re: How can I set thi conditional?
Post by: Waydin2296 on 28 Mar 2014 03:51:31 PM
Quote from: tequila on 28 Mar 2014 07:05:01 AM
IF (Maximum ([StatusCheck])>0) then ('error') else ('OKI')
but it don't really work. It show only single 'error' and not 'overall error' when one process of Processgroup have error values.
It it relational Package.

Try this instead because the maximum is already in the dataitem StatusCheck for the proper group
IF (([StatusCheck])>0) then ('error') else ('OKI')

You may want to build a small list to see that the StatusCheck is grabbing the maximum at the correct group