COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: cognos05 on 05 Sep 2018 11:25:41 AM

Title: conditional formating on agency column
Post by: cognos05 on 05 Sep 2018 11:25:41 AM
Hi ,

I have my agency column shown in rows , I want them to be highlighed in red based on their attribute value .

I am trying to use this and getting an erro this function not avaialble .

filter([DailySales].[Customer ShipTo].[Customer ShipTo].[ShipToReg-Dist],[DailySales].[Customer ShipTo].[Customer ShipTo].[ShipToReg-Dist].[Member Description]='True')

Can you tell me the steps to get this work .

Title: Re: conditional formating on agency column
Post by: MFGF on 06 Sep 2018 04:13:34 AM
Quote from: nithya1224 on 05 Sep 2018 11:25:41 AM
Hi ,

I have my agency column shown in rows , I want them to be highlighed in red based on their attribute value .

I am trying to use this and getting an erro this function not avaialble .

filter([DailySales].[Customer ShipTo].[Customer ShipTo].[ShipToReg-Dist],[DailySales].[Customer ShipTo].[Customer ShipTo].[ShipToReg-Dist].[Member Description]='True')

Can you tell me the steps to get this work .

Can you tell us the exact error message you are seeing, and also where you are using this expression in your report?

MF.
Title: Re: conditional formating on agency column
Post by: cognos05 on 06 Sep 2018 01:58:55 PM
In a boolean variable. I just need to check if the Agency level attribute is yes then color it .

How do i have a condtion to check the agency level attribute value in a boolean variable .
Title: Re: conditional formating on agency column
Post by: cognos05 on 07 Sep 2018 09:00:15 AM
the issue is to reference the value of member description value in boolean expression .

.

Title: Re: conditional formating on agency column
Post by: Cognos_Jan2017 on 07 Sep 2018 10:13:24 AM
Quotethe issue is to reference the value of member description value in boolean expression .

How about utilizing a Case When ... whatever the values are of your "member description value"
then set the Boolean.
Title: Re: conditional formating on agency column
Post by: cognos05 on 07 Sep 2018 12:13:22 PM
trying to use this expression in boolean variable

caption([DailySales].[Customer ShipTo].[Customer ShipTo].[ShipToReg-Dist].[Member Description])='True'


getting CRX-API-0011 error . FUnction name was not found at r near position 7 in expression caption() etc..

Title: Re: conditional formating on agency column
Post by: cognos05 on 08 Sep 2018 10:16:41 PM
so the rows has the member level for agency from customer description . The attribute value for each agency is loaded under member description .

Now if I need to hight the agency which has true value for its member description , how to check this in boolean expression . looks like caption is not allowed in there .
Title: Re: conditional formating on agency column
Post by: cognos05 on 10 Sep 2018 08:06:11 PM
Any suggestion is appreciated.
Title: Re: conditional formating on agency column
Post by: Cognos_Jan2017 on 11 Sep 2018 12:14:05 PM
Not sure what data you are working with, but Case When can be utilized to set Booleans, IE ...

Case
When [Q_Detail].[TheTarget] >= [Q_Detail].[ABC] Then 'Green'
When [Q_Detail].[TheTarget] <= [Q_Detail].[ABC] Then 'Red'
End

Does that help?
Title: Re: conditional formating on agency column
Post by: cognos05 on 11 Sep 2018 08:03:22 PM
my rows has the level member .
In the boolean expression I am dragging in the member description attribute of that level and comparing to true .

But its not eveluating the expression .

I am doing Query1.[member description]='True';
Title: Re: conditional formating on agency column
Post by: Cognos_Jan2017 on 11 Sep 2018 08:51:11 PM
Is your evaluation in a complete Case When ...

Case
When [Query1]. [member description] = True then ...
End
Title: Re: conditional formating on agency column
Post by: cognos05 on 12 Sep 2018 07:18:27 AM
I am doing it as a boolean expression and I think Query1.Member description = 'True' should be fine .

I noticed the output works if I have the member description in the layout of the crosstab . If i remove it from cross tab it doesnt know how the agency value is related to its description .
Title: Re: conditional formating on agency column
Post by: Cognos_Jan2017 on 12 Sep 2018 09:44:41 AM
QuoteI noticed the output works if I have the member description in the layout of the crosstab . If i remove it from cross tab it doesnt know how the agency value is related to its description

Prior to taking the corrective action above, you may have seen an error message like ...
QuoteIf the item exists in a query but is not referenced in the layout, add it to a property list.

Is it working properly now?
Title: Re: conditional formating on agency column
Post by: cognos05 on 12 Sep 2018 11:20:27 AM
its expecting the attribute to be also part of the crosstab layout . If i remove it its not workign .
Title: Re: conditional formating on agency column
Post by: Cognos_Jan2017 on 12 Sep 2018 11:46:49 AM
Quoteits expecting the attribute to be also part of the crosstab layout . If i remove it its not workign .

But that makes it work.

That is a scenario I have also seen.  Just make it part of the crosstab layout ... and should work fine.
Title: Re: conditional formating on agency column
Post by: bdbits on 12 Sep 2018 03:08:45 PM
You have to have items bound to the crosstab in order to use them. It's been that way since... well, a long time. But you don't have to actually have them on the layout itself.

https://www.cognoise.com/index.php?topic=10396.0 (https://www.cognoise.com/index.php?topic=10396.0)

See Lynn's answer on that post.
Title: Re: conditional formating on agency column
Post by: New_Guy on 18 Sep 2018 10:24:46 AM
Hi,
Just a note, select the description in the properties or place it in crosstab and do a box type none.
Good luck
New guy
Title: Re: conditional formating on agency column
Post by: cognos05 on 18 Sep 2018 11:30:18 AM
thanks that worked . Adding the description to the properies of the member,