COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: yvswamy on 09 Jun 2017 03:40:41 AM

Title: Conditional Slicer
Post by: yvswamy on 09 Jun 2017 03:40:41 AM
Hi

How to create a Conditional slicer as below which is from Relational model. I manged to get that when both dimensions are there in Cross tab but not able to succeed when they are not there in the crosstab. I need to filter the query. Please help me.

IF (DIM#1 = 'ABC' ) THEN
   ( DIM#2 = 'X')
ELSE
   (DIME#2 in ('Y', 'Z')

Title: Re: Conditional Slicer
Post by: BigChris on 09 Jun 2017 03:50:50 AM
If it's not in the crosstab then a slicer wouldn't work anyway (at least, that's the way I've always understood things).
Title: Re: Conditional Slicer
Post by: Drisya on 09 Jun 2017 03:57:00 AM
If it helps.

(DIM#1 = 'ABC' and DIM#2 = 'X') or (DIM#1 <> 'ABC' and DIME#2 in ('Y', 'Z'))
Title: Re: Conditional Slicer
Post by: yvswamy on 09 Jun 2017 03:58:25 AM
HI BigChris,

Thank you for your quick reply.  Even if the dimensions are not there in the cross tab, Slicers work without any problem and I have been doing it. Only problem is I am not able to do it conditionally.

Is there any other alternative for my problem.

Appreciate your time.

Thank you.
Title: Re: Conditional Slicer
Post by: yvswamy on 09 Jun 2017 04:01:16 AM
Hi Drisya,

Thank you for your quick reply.

Slicers will not accept AND OR conditions.


Thank you.
Title: Re: Conditional Slicer
Post by: New_Guy on 09 Jun 2017 07:21:13 AM
Quote from: yvswamy on 09 Jun 2017 03:40:41 AM
Hi

How to create a Conditional slicer as below which is from Relational model. I manged to get that when both dimensions are there in Cross tab but not able to succeed when they are not there in the crosstab. I need to filter the query. Please help me.

IF (DIM#1 = 'ABC' ) THEN
   ( DIM#2 = 'X')
ELSE
   (DIME#2 in ('Y', 'Z')

Hi,

I am assuming this is a DMR model as you said it is relational and you are using slicers. Slicers wont work in a row by row basis conditionally. When you said that you got it working when you placed this 2 dim's in the crosstab, Do you mean that you got the slicer to work or just the data item to work.

Good luck
New guy
Title: Re: Conditional Slicer
Post by: yvswamy on 12 Jun 2017 12:14:53 AM
Hi New_Guy,

As you rightly said its a Dimensional Cube.

Slicers are not working. I just added the data Items to the cross tab to get the desired output.

Let me know if there is any other solution to my problem.