Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am charting survey results (see image below). I want to maintain the color scheme below (green for best to red for worst). The issue is that some results sets are so small that there could be only 1 response, and if that is 'Never' then it appears as Green since that's the first color in my scheme.
How can I use conditional formatting so that 'Always' is set to Green, 'Never' is set to Red, etc?
All the examples I've seen here for conditional colors seem to be based on the values (count or sum).
Thanks
Hi Durgampudi,
You can do it by setting the background color of your expression. Please see the following image for reference:
In this example, I have multiple status a case can go through, so in order to keep the same color for each status, I added an expression in the background option. This expression evaluates the state of the current row and returns that color that it should have.
Hope it helps.
Regards,
-- Karla
Hi Durgampudi,
You can do it by setting the background color of your expression. Please see the following image for reference:
In this example, I have multiple status a case can go through, so in order to keep the same color for each status, I added an expression in the background option. This expression evaluates the state of the current row and returns that color that it should have.
Hope it helps.
Regards,
-- Karla
Is his a dimension, or a collection of expressions? If its the latter, you could use persistent option on the Colors tab to lock the color to a particular expression. If it is a dimension, then go with the above option.
Are the values of that dimension are fixed like what you have in the bar graph,
then create a inline load
as below
Load * Inline [
YourxaxisDimension, Color
Always,RGB(0,255,0)
Never, RGB(255,0,0)
...
...
];
Load * Inline [
YourxaxisDimension, Red,Green,Blue
Always,0,255,0
Never, 255,0,0
...
...
];
After that goto the chart and expression, background and add
=RgB(Red,Green,Blue)
Please attached sample where I have fixed two colors for Always and Never
Hope it helps
You can also try one more option in the colors tab i.e. Persistant, but some how that doesn't work all times.
Hi Karla,
Thanks, what you've shown seems to be what I need, but for some reason my expression is not having the expected effect.
I don't have a syntax error. Do you see what I may be doing wrong below?
Thanks
Hi Naren,
So far, I don't see any error in your expression, could you please share a sample qvw so I could check it.
Regards,
-- Karla
Hi Karla,
QVW is attached. Thanks so much for looking into this!
~ Naren
Hi Naren,
can you add a '=' symbol before pick and check
Also
I see "F. " is missing for Never.
Please check attached file
Hi Naren,
I've checked the expression, and so far I only found a typo mistake, you have Never instead of F. Never. And the green color for Always and Mostly look very similar, maybe you could change the tone. I'm sending you the QVW back, adding some different color so you can see the effect.
Hope it helps.
-- Karla