Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color Expression for stacked bar graph not working

I have an issues apply colors correctly to a stacked bar chart

I always want to show 2 years of data, I get that done

I want to apply colors based on a field, that works when ... either everything is selected or nothing is selected

I've attached a file to show what I mean

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

only({1}

IF(group = 'A',RGB(84,130,53),

IF(group = 'B', RGB(101,156,64),

IF(group = 'C', RGB(121,187,76),

IF(group = 'D', RGB(145,224,92)))))

)

View solution in original post

4 Replies
swuehl
MVP
MVP

Maybe like

only({1}

IF(group = 'A',RGB(84,130,53),

IF(group = 'B', RGB(101,156,64),

IF(group = 'C', RGB(121,187,76),

IF(group = 'D', RGB(145,224,92)))))

)

Not applicable
Author

That did the trick.

Can you maybe expand on the use of that ONLY({1} )??

I'm new to qlik and not familiar with it's uses

swuehl
MVP
MVP

The set expression (have a look at chapter 'set analysis' in the Help) with set identifier 1

{1} is forcing QV to ignore all user selections for that aggregation.

You can use set expressions only within aggregation functions like sum(), count(), and yes, only().

Not applicable
Author

Ok, so I get the set analysis part of {1} to ignore all selections.  I guess I'm not familiar with the aggregation is only()