Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

use Color Area-calculated

hi all.

I want some part of list be a red color.

ex.

the field name= test

content =

222.PNG.png

I made a list box by using Test.xlsx.

and I want highlight some part (words that begin with 'a')

123.PNG.png

what do i write edit Expression( on Calculated)

10 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Is the field name [Calculated]?You could try

     If(WildMatch(Calculated, 'a*'), Red())

But I don't its possible to vary the colour in a list box.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi, Jonathan.


I wrote 'If(WildMatch(Test, 'a*'), Red())

that's not working.....

and also use this

=if(Test like 'a%', RED(), GREEN())

thank you.

jonathandienst
Partner - Champion III
Partner - Champion III

The first syntax is correct, but as I said, I think the calculated colour is ignored in a list box. Your second syntax is SQL, not QV and won't work in an expression.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi,

You can write an expression like:

 

=If(WildMatch(AA, 'a*'), Red(),

  If(WildMatch(AA, 'b*'), Green()

))

And so on...for all the selections you want.

But this will change the entire background colour of list box and will work only when the value is selected i.e. the colour will appear only when you select something starting with a or b (individually and not combinely).

Not applicable
Author

so, you mean

It's impossible partially different colors on a list box (no selection situation).

Test(list box)

apple

air

apartment

bi

banana

clear

Not applicable
Author

really?

I don't know that SQL not working.

thank you.

Not applicable
Author

Hi,

You can change text colour but still the selection situaton prevails.

For changing the text color instead of background, you just need to change the check box style anything other than "Qlikview Classic" in presentation tab:

textcolour.bmp

After changing style to anything other than "Qlikview Classic" or "User Default", you can go to font tab and change the font colour using the calculation i mentioned earlier.

marc_behrens
Partner - Contributor III
Partner - Contributor III

Hi, would something like this work for you?

Marc

jonathandienst
Partner - Champion III
Partner - Champion III

The SQL prefix (as in SQL SELECT...) in the load script sends the text following it to the SQL server for execution - it is not executed by QV. So you must use SQL syntax in a SQL SELECT or SQL EXECUTE clause.Everywhere else requires QV syntax (including LOAD statements and obviously in expressions).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein