Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Displaying two different results within an expression as different colour bars

Folks,

I have a problem which I am sure must be easy to solve, but I'm not entirely sure where to start.

I have attached a  sample qvw. I have some data showing mileage lost due to a number of reasons, traffic, road closure, staff dispute etc etc. Some of these reasons are chargeable and some are not, I'm trying to work out the easiest way of showing the difference so red bars for chargeable and blue for non-chargeable. I have tried moving category as the main dimension and then type as the second dimension, which provides me with the split but doesn't give me the consistent colour theme.

Any assistance will be helpful

Thanks

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find the attached document for solution.

I used the Background Color expression as below

=If(Category = 'Chargeable', RGB(255,0,0), RGB(0,0, 255))

Hope this helps you.

Regards,

Jagan.

View solution in original post

4 Replies
swuehl
MVP
MVP

try using this as background color expression (open attributes by clicking on the plus next to your expression in expression tab):

if(Category='Chargeable',lightred(),lightblue())

hope this helps,

Stefan

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Use persistent colors option in the colors tab which will give you consistent colors.

Celambarasan

jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find the attached document for solution.

I used the Background Color expression as below

=If(Category = 'Chargeable', RGB(255,0,0), RGB(0,0, 255))

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Thats great Jagan, thanks for your assistance.