Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a stacked bar chart that has one dimension and two measures. the dimension is 'Customer' and the measures are 'SuccessCDR' and 'FailCDR', on the stacked bar chart, I want the 'SuccessCDR' to show as lightgreen() instead of blue and 'FailCDR' to show as lightred() instead of red.
Every example i have found is checking a value like
if(Type='Discussion',blue(),if(Type='Replies',Green(),Red()))
Except in my case there is no field value, I just want that measure to show up with a different color expression.
Something like this
if('SuccessCDR',green(),if('FailCDR',Red()))
How do i do this?
You must have a field that contains the 'SuccessCDR' and 'FailCDR' values, so you should be able to use something like :
if(YourField='SuccessCDR',green(),if(YourField='FailCDR',Red()))
Simply change the first and second color in the color tab of the chart properties or set the background color of the expressions by clicking on the + sign in front of the expression and use LightGreen() or LightRed() as expression for the background color.
Hi,
Go to background color of first expression-lightgreen()
2nd expression background color lightred()
khushboo
Hi Baskar,
Each Expression have some properties
Go to expression background color of first expression->-> Background color-> Definition-> you can give required color- lightgreen()
2nd expression background color ->Definition -> lightred()
Ramya
I do have a field that both these measures are based on, its called "CDR_Status"
I put the following :-
if(CDR_Status='Success',green(),if(CDR_Status='Fail',Red()))
expression came out ok, but the barchart remains grey. Any advice?
Im sorry, but i didn't realize that I posted it in the QlikView section, I meant this for QlikSense.
Well, it is in the QlikSense section now, I might have missed that. If so, Sorry for that.
I moved it after I replied to you
Bashar,
I am dealing with this colour issue as well...
I just learned that Qlik Sense 2.0 offers no way yet to change stacked bar colour with simple IF statements using multiple measures.
It is possible if you have two dimensions and one measure though. But not with one dimensions and multiple measures. Either with a drill-down dimension.
Please see my reply here:
Re: How to use custom colours in a stacked bar chart
Hope this helps,
Demian