Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Stars
Creator
Creator

Color Coding by Contained Text within a Bar Chart - wildmatch? like? text contains?

I'm stuck.  I sent out a survey and can't graph the responses the way I want. 
Question A:  What year did you install your system?
Question B:  What brand is your system?

I want a bar graph of the years, but I want the color determined by the brand.

To graph the bars, I use this, and it works perfectly.

=(Avg({1<Year = {$(=Max(num#(Year ,'####')))}>} Aggr(
Sum({1<QPermID={"YearInstalled*"}>}Response)
,YearID,Year)))

I want to specify the colors, but can't figure out the syntax.  Wildcard match?  Text contains?  

I figure I need nested if statements.... if the brand is Target, blue(), if the brand is Walmart, red(), etc.

But how do I get it to recognize the text?  '*target*', like Target, ????

Any ideas?  Thank you!

 

1 Reply
edwin
Master II
Master II

couldnt the color (response to 2nd question) be converted to a separate field?  that way it becomes a dimension then you can use it in the color expression