COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: ankur10 on 02 Oct 2017 02:19:38 AM

Title: Column based filtering how to select it. Please guide.
Post by: ankur10 on 02 Oct 2017 02:19:38 AM
How to put/create column based filter. Please guide.

Requesting you to please have a look at the screen shot and tell me how to filter it based on the coloumn

Thank you,
Ankur
Title: Re: Column based filtering how to select it. Please guide.
Post by: ankur10 on 02 Oct 2017 02:23:47 AM
Also I'm not sure how to create a filter based on these conditions.

Please guide.

Thank you,
Ankur
Title: Re: Column based filtering how to select it. Please guide.
Post by: MFGF on 02 Oct 2017 03:33:00 AM
Quote from: ankur10 on 02 Oct 2017 02:19:38 AM
How to put/create column based filter. Please guide.

Requesting you to please have a look at the screen shot and tell me how to filter it based on the coloumn

Thank you,
Ankur

Hi,

Your filter would be two expressions either side of an OR

eg

([your Scheduled End date] between 2017-04-01 and 2017-06-30 AND [your Status item] = 'Completed') OR ([your Start Date] <= 2017-06-30 AND [your Status item] in ('Active', 'Extension'))

MF.
Title: Re: Column based filtering how to select it. Please guide.
Post by: ankur10 on 02 Oct 2017 03:39:34 AM
I'm not sure how to make a filter for both of these filters. I tried global filter but that doesnt work. As it filters only one condition. Please guide me how to do it.

Scheduled End Between 4/1/2017 to 6/30/2017 Status =Completed

Start Date <= june 30 Status= Active & Extension

Thank You.
Title: Re: Column based filtering how to select it. Please guide.
Post by: BigChris on 02 Oct 2017 05:13:26 AM
Which part of MFGF's reply don't you understand? Does splitting the filter statement into two lines make it easier for you?

([your Scheduled End date] between 2017-04-01 and 2017-06-30 AND [your Status item] = 'Completed')
OR
([your Start Date] <= 2017-06-30 AND [your Status item] in ('Active', 'Extension'))
Title: Re: Column based filtering how to select it. Please guide.
Post by: ankur10 on 02 Oct 2017 05:17:10 AM
Thank you for the reply. I'm sorry to ask that again. My understanding is that "OR" function will give me results by comparing any one of these filters. However I want the data for both of the filters also both of the filters will show add different results. Sorry for being trouble. Thank you for the help.

Please guide me.
Title: Re: Column based filtering how to select it. Please guide.
Post by: MFGF on 02 Oct 2017 05:54:12 AM
Quote from: ankur10 on 02 Oct 2017 05:17:10 AM
Thank you for the reply. I'm sorry to ask that again. My understanding is that "OR" function will give me results by comparing any one of these filters. However I want the data for both of the filters also both of the filters will show add different results. Sorry for being trouble. Thank you for the help.

Please guide me.

Hi,

Can you be clear on the requirement here? Is it that you want to see rows of data where either one of the above conditions is true, or do you want to see rows of data where both conditions are true for a row? If the latter, simply replace the OR with an AND...

MF.
Title: Re: Column based filtering how to select it. Please guide.
Post by: BigChris on 02 Oct 2017 06:25:13 AM
Replacing the OR with an AND won't work, because you won't get any records where
[your Status item] = 'Completed'
AND
[your Status item] in ('Active', 'Extension')

You'll need to be more specific about what you want it MFGF's filter doesn't give you the right results.
Title: Re: Column based filtering how to select it. Please guide.
Post by: MFGF on 02 Oct 2017 11:03:43 AM
Quote from: BigChris on 02 Oct 2017 06:25:13 AM
Replacing the OR with an AND won't work, because you won't get any records where
[your Status item] = 'Completed'
AND
[your Status item] in ('Active', 'Extension')

You'll need to be more specific about what you want it MFGF's filter doesn't give you the right results.

Ah! Good catch Chris!

Ankur can you explain what the exact requirement is?

MF.
Title: Re: Column based filtering how to select it. Please guide.
Post by: ankur10 on 02 Oct 2017 12:04:51 PM
Thank you for the reply.

I want that it should filter the values for this time frame-  Scheduled End Between 4/1/2017 to 6/30/2017 Status =Completed

and for this time frame it should filter the values and show in the same column-  Start Date <= june 30 Status= Active & Extension

Thank you,
Ankur


Title: Re: Column based filtering how to select it. Please guide.
Post by: BigChris on 03 Oct 2017 02:00:13 AM
In that case MFGF's filter will work for you just fine.