hi Friends ,
Bars on graphs should be color-coded R/Y/G (R-red;Y-Yellow;G-Green)
case
when
[actual_value]>=[Target_value] then (1)
when [actual_value]<=[Target_value] then (2)
else (3)
end
1--green colour bar should display in graph
2--red colour bar should display in graph
3--Yellow colour bar should display in graph
can anybody suggest me the approach
thanks
aamuktha
Here, try this, maybe it'll inspire you.
<report xml:lang="en-ca" xmlns="http://developer.cognos.com/schemas/report/1/"><!--RS:1.1-->
<layoutList>
<layout>
<pageSet>
<page name="Page1">
<pageBody><chart refQuery="Query1_chart">
<chartBody/>
<title render="false">
<text/>
</title>
<subtitle render="false">
<text/>
</subtitle>
<footer render="false">
<text/>
</footer>
<legend>
<itemTruncationText>
<text/>
</itemTruncationText>
</legend>
<axis axisPosition="X">
<labels/>
</axis>
<categoryItemTruncationText>
<text/>
</categoryItemTruncationText>
<axis axisPosition="Y1">
<labels/>
</axis>
<columnChart depth="0" standardType="standard"/>
<chartLevel refLevel="EmployeeID"><queryItemRef refItem="EmployeeID"/><chartText><queryItemRef refItem="EmployeeID" content="label"/></chartText></chartLevel><chartMeasure><chartText><queryItemRef refItem="Revenue LOW" content="label"/></chartText><member refMember="Revenue LOW"/></chartMeasure><chartMeasure><chartText><queryItemRef refItem="Revenue HIGH" content="label"/></chartText><member refMember="Revenue HIGH"/></chartMeasure></chart>
</pageBody>
</page></pageSet></layout>
</layoutList>
<modelConnection name="/content/package[@name='Northwind']/model[@name='model']"/><querySet xml:lang="en-ca"><BIQuery name="Query1"><cube><factList><item aggregate="none" refItem="Revenue LOW" isHeader="true"/><item aggregate="none" refItem="Revenue HIGH" isHeader="true"/></factList><dimension name="EmployeeID"><level name="EmployeeID"><item aggregate="none" refItem="EmployeeID" key="true" isHeader="true"/></level></dimension></cube><tabularModel name="Tabular Model1"><dataItem name="EmployeeID" aggregate="none"><expression>[Report one].[Employee region].[EmployeeID]</expression></dataItem><dataItem name="Revenue LOW" aggregate="total"><expression>IF(TOTAL([Report one].[Orders Facts].[Revenue])<80000)
THEN([Report one].[Orders Facts].[Revenue])
ELSE(0)</expression></dataItem><dataItem name="Revenue HIGH" aggregate="total"><expression>IF(TOTAL([Report one].[Orders Facts].[Revenue])>=80000)
THEN([Report one].[Orders Facts].[Revenue])
ELSE(0)</expression></dataItem></tabularModel></BIQuery><BIQuery name="Query1_chart"><cubeReference refQuery="Query1"/><summary><dataCells><item refItem="Revenue LOW"/><item refItem="Revenue HIGH"/></dataCells><columnEdge><level refLevel="EmployeeID"><item refItem="EmployeeID"/></level></columnEdge><rowEdge><cellMembers/></rowEdge></summary></BIQuery></querySet></report>
Hi...Iam using Oracle database and the example you have sent is not working...Can you please send this again...
Thanks,
S
Of course you will not be able to execute the report.. :o :o
The chances that you have the same databases with the same names as I do are quite slim. I posted this report specification to show how I would have approached the problem, look at what I did with the "facts" and the bar chart and hopefully it'll inspire you.
Cheers
Hai
You have a lessong how to color the charts ,check the cognos support
phani
Hi...we know how to color the charts but the question posted by her is how to apply dif colours with different conditions in single graph... :D
Thanks,
S
In cognos8 there is a conditional palette... but in reportnet, only the option i suggested might help... that I can think of
Hi Boris...dnt we have any other option reportnetMR2...?Can u send me one more example...I want to try again...Iam not clear with ex u have sent me...can u send me an ex in Gosales with oracle DB if u dnt mind...
thanks in advance...
Thanks
S ???