COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: hemu310 on 18 Jun 2008 06:06:55 AM

Title: Condiltional formatting in Chart
Post by: hemu310 on 18 Jun 2008 06:06:55 AM
Hi,



I am creating bar chart reports in cognos8.

In chart reports, I use conditional pellet feature of Cognos.

but when I use any condition control like if, case, it does not give me proper out put.

My scenario is given below.

I have different department and each department has many hospitals.

My chart report will select the department name, year and month for generating report.

Then it gives me revenue of each hospital under selected department and under specified month and year.

But when I used conditional pallet with following variable, which is given below…


Variable: String1

Expression: if [query1].[hospital_revenue]<=[query1].[average_revenue] then “red” else “green”

Values:

Red: if the total revenue of hospital under selected department is less then average revenue of selected department then bar will have red color.

Green: if the total revenue of hospital under selected department is greater then average revenue of selected department then bar will have green color.

Average revenue: it is some of all the hospital_revenue in the department divided by number of hospital in the department.



Hence above should check for the total revenue of each hospital with selected departments average revenue. And based on that it should give us the Red or Green Chart for each hospital under selected department.



So please do the needful.
Thanks in Advance.

Title: Re: Condiltional formatting in Chart
Post by: jahnavi on 18 Jun 2008 10:47:32 PM
I tried out this bt vreating a very simple report with GOSALES AND RETAILERS package its working

SEE THE Attachment.If this is not your requirement let me know
Title: Re: Condiltional formatting in Chart
Post by: hemu310 on 19 Jun 2008 04:06:59 AM
Hi thanks for the Reply.

but in my case we have we are trying to compare in series. we are not using measures.

so how we should do it. ?

Title: Re: Condiltional formatting in Chart
Post by: jahnavi on 20 Jun 2008 12:41:25 AM
Ok.. I understand your requirement.

I will try and i will inform abt that
Title: Re: Condiltional formatting in Chart
Post by: rockytopmark on 20 Jun 2008 10:02:22 AM
The Expression of a string variable should not have a comparitor... it should jus tbe a column, then values that are possible for that column would be defined and then used in the conditional styling, render, etc...