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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
tinkerz1
Creator II
Creator II

background color on set analysis

Hi,

I can't set the background colour with an expression.

The expression formula switches between set analysis and normal output based on a condition.

=if(getselectedcount([Header])>1,

Sum([Alternate State 1]...<Set Analysis>),

DATA

)

The formula in the background color is

=If(Wildmatch([label_M],'*Red*'),RGB(255,0,0),
If(Wildmatch([label_M],'*Amber*'),RGB(255,191,0)))

And label_M is is a field in the pivot table.

The label_M field in both conditions returns a Red and a Amber field, why won't the colour work when the set analysis condition is true?

Thanks.

Labels (1)
12 Replies
sunny_talwar
MVP
MVP

We did not remove anything from the expression Neil. We only changed the expression for the background color.

UPDATE:

What it was

Background Expression:

=if(not wildmatch(Company,'I','H'),RGB(255,0,0),

if(wildmatch(Company,'I'),RGB(255,255,0),

if(wildmatch(Company,'H'),RGB(0,255,0),

)))


Actual Expression:

=if(getselectedcount(Company)>1,

Sum({<Company={I}>} distinct Sales)

,

Sales

)

New

Background Expression:

=if(not wildmatch(Only({<Company>} Company),'I','H'),RGB(255,0,0),

if(wildmatch(Only({<Company>} Company),'I'),RGB(255,255,0),

if(wildmatch(Only({<Company>} Company),'H'),RGB(0,255,0),

)))


Actual Expression:

=if(getselectedcount(Company)>1,

Sum({<Company={I}>} distinct Sales)

,

Sales

)

No change to your actual expression

tinkerz1
Creator II
Creator II
Author

Sorry I must have saved the update for the color over the expression.

If more than 1 company is selected, then the set analysis part of the if statement triggers.

But this should be colored yellow as the expression points at set analysis.

Thanks.

background color test.PNG

sunny_talwar
MVP
MVP

I see yellow Neil

Capture.PNG