Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a below expression in bar chart which shows the Fail percentage and 'No Failures' on X axis. How can I change the colour of X axis so that I want if there is Fail percentage the colour should be in red. If there are 'No Failures' the colour should be in green.
can anyone suggest me please?
Expression:
IF(Count({<[Result ]={'Fail'}>}Distinct [ID])/(Count({<[ Result ]={'Pass'}>} Distinct ([ID]))+
Count({<[ Result ]={'Fail'}>} Distinct ([ID])))=0,'No Failures',
Count({<[ Result ]={'Fail'}>}Distinct [ID])/(Count({<[ Result ]={'Pass'}>} Distinct ([ID]))+
Count({<[ Result ]={'Fail'}>} Distinct ([ID]))))
EDIT: I know to change the colour in Text Colour(). But I need the expression.
In expression, background color you can write the expression like:
if(Result='Fail',Red(),Green());
Hope this is what you want..!
could u post some qvw
In expression, background color you can write the expression like:
if(Result='Fail',Red(),Green());
Hope this is what you want..!
Thanks. Perfect.
In graph->properties->Expression tab
expand the '+'symbol
then choose background color
try the following expr in this
IF(if(Count({<[Result ]={'Fail'}>}Distinct [ID])/(Count({<[ Result ]={'Pass'}>} Distinct ([ID]))+
Count({<[ Result ]={'Fail'}>} Distinct ([ID])))=0,'No Failures',
Count({<[ Result ]={'Fail'}>}Distinct [ID])/(Count({<[ Result ]={'Pass'}>} Distinct ([ID]))+
Count({<[ Result ]={'Fail'}>} Distinct ([ID]))))='No Failures',green(),rgb(255,0,0))
hope it will work....
Found more exact expression
If([Result]>'Fail', Green(),Red())
how many dimension u r having if u have only one dimension eg status and one expression eg count (distint ID)
check multicolor in color tab so for eg if u have 4 status then u will have four bars in 4 color
or write in background
if(Result='Fail',red(),green()