COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: knip on 06 May 2015 11:12:44 PM

Title: Applying Mutiple Filters
Post by: knip on 06 May 2015 11:12:44 PM
Hi Guys,
            I have a report where in i need to filter my data based on the different conditions, can this be possible in cognos? .. For example given below
When i select A from filter1 and B from Filter2 i have to filter my data with values >10
When i select  C from filter1 and D from Filter2 i have to filter my data with values >20

this is just an example i will be having around 100's of such combinations with different values   .... can this all be done in a single run of the report?

Example:

Filter1 Filter2    Value

A          B           10

C          D           20

........
....
........
.........
Title: Re: Applying Mutiple Filters
Post by: BigChris on 07 May 2015 02:01:51 AM
It can be done, but you'll need to specify all of the combinations:

(?Prompt1? = 'A' and ?Prompt2? = 'B' and [Value] >10) or (?Prompt1 = 'C' and ?Prompt2? = 'D' and [Value] > 20) or ...

You might be able to group some of the options together to make things a bit easier, but you're still going to need to work them all out. Could you do something further back in the model, or even in the database, to identify the data/combination that you want to filter on?
Title: Re: Applying Mutiple Filters
Post by: knip on 07 May 2015 07:20:50 AM
the combinations mentioned will be static and  the values entered will be dynamic (user can change the values in next run)
Title: Re: Applying Mutiple Filters
Post by: bvk.cognoise on 07 May 2015 07:56:00 AM
Hi Knip,,

Could you please elaborate your requirement

what does the "the values entered will be dynamic" means.


Regards
Bvk

Title: Re: Applying Mutiple Filters
Post by: BigChris on 12 May 2015 03:16:09 AM
Rereading that suggests that you'd need something like

([Field1] = 'A' and [Field2] = 'B' and [Value] > ?Prompt_Value_1?) or
([Field1] = 'C' and [Field2] = 'D' and [Value] > ?Prompt_Value_2?) or ...