COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognos05 on 27 Oct 2014 04:29:16 PM

Title: using like with caption() dimensional function
Post by: cognos05 on 27 Oct 2014 04:29:16 PM
Hi All,

I am using a dimensional package.I have a simple list report with reps in one column, their customers in the next column and qty sold in the next column.

I have grouped the reps. I dont want to show the reps whose name contains  the number like 999.

How should my filter expression be :
Caption( rep) not like '%999%' in the slicer gives error.

I think the  I should use the filter expression in the first column that is the rep.

Filter(reps,caption(reps) like or contains).

I am stuck here. Please provide your suggestions for the filter expression with contains or like for dimensional source.

Thanks,
Nithya.
Title: Re: using like with caption() dimensional function
Post by: MFGF on 29 Oct 2014 07:25:31 AM
Quote from: nithya1224 on 27 Oct 2014 04:29:16 PM
Hi All,

I am using a dimensional package.I have a simple list report with reps in one column, their customers in the next column and qty sold in the next column.

I have grouped the reps. I dont want to show the reps whose name contains  the number like 999.

How should my filter expression be :
Caption( rep) not like '%999%' in the slicer gives error.

I think the  I should use the filter expression in the first column that is the rep.

Filter(reps,caption(reps) like or contains).

I am stuck here. Please provide your suggestions for the filter expression with contains or like for dimensional source.

Thanks,
Nithya.

Replace the Reps list column with a query calculation

filter([Your reps level], caption([Your reps level]) not contains '999')

Cheers!

MF.
Title: Re: using like with caption() dimensional function
Post by: cognos05 on 29 Oct 2014 07:54:58 AM
Thanks MFGF, can I use multiple conditions in the filter expression like

filter([rep level],caption([rep level])not contains '999' and Qty=0)

Thanks,
Nithya
Title: Re: using like with caption() dimensional function
Post by: MFGF on 29 Oct 2014 08:11:36 AM
Quote from: nithya1224 on 29 Oct 2014 07:54:58 AM
Thanks MFGF, can I use multiple conditions in the filter expression like

filter([rep level],caption([rep level])not contains '999' and Qty=0)

Thanks,
Nithya

If Qty is a measure, yes - drag it into your expression as desired.

MF.