COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: imzy66 on 13 Nov 2019 06:06:50 AM

Title: HELP :(
Post by: imzy66 on 13 Nov 2019 06:06:50 AM
Hi All,

I wanted to see if anyone can help.

I have 3 columns,

1 column, a name
1 column, invoice number
1 column, an IF ELSE statement

the if else works on the basis when it finds a particular name in the column for names, it then places the word 'Pharma' all else null.

I now need a column to look at invoice number and the 'if else' column to then work out, if an invoice number contains 'Pharma' in the multiple lines, then all the invoice number should be 'Pharma' otherwise all else null. see attached screen print of what i currently have


Title: Re: HELP :(
Post by: CognosPaul on 13 Nov 2019 06:37:12 AM
Try creating a new data that shows

maximum([Contract] for [Invoice Number])
Title: Re: HELP :(
Post by: imzy66 on 13 Nov 2019 06:45:17 AM
hi

i did the below: -

IF( maximum([Contract] for [Invoice Number]) ='Pharma')
THEN('Pharma')
ELSE(NULL)

this worked perfectly!! - cant believe didn't think of this myself!!!

THANK YOU SO MUCH!!!!