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: 
Not applicable

Need Help

Hi Community,

Can we show 2 colors in one cell..

I have one pivot table.... 2 dimensions =PortName and Description

Expression = Count(KeyNum)

I have used background color expression

if(Party='Green', Green(),

  if(Party='RED' , Red(),

    if(Party='Orange' , Blue(),

      if(Party='Yellow', Yellow())))))

Here, few cells having no color, because that count coming Party=Green and RED like this

if i am use

if(Party='Green', Green(),

  if(Party='RED'  and 'Green', Red()))

Showing only one color Green... but this condition not working  if(Party='RED'  and 'Green', Red())

Suppose one cell value 20, coming from Party =Green=5

                                                            Party=RED=15


is this possible in one cell
1.PNG

Yellow color 5 count

Red color 15 count


OR

At least i have to show different color

Please anyone give suggestion..

Thanks in Advance.........

PFA

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi Nagaraju,

Try like this..

if(Party='Green' and Party='RED' , Red())


** Check the Party Field, it is a case sensitive

Edit:

You can try the below expression in your text background

if(Concat(DISTINCT Party)='Green', Green(),

  if(Concat(DISTINCT Party)='RED' , Blue(),

     if(Concat(DISTINCT Party)='GreenRED', RGB(255,0,100),

  if(Concat(DISTINCT Party)='Orange' , rgb(120,225,0),

  if(Concat(DISTINCT Party)='GreenYellow' , rgb(100,200,0),

  if(Concat(DISTINCT Party)='Yellow', Yellow()))))))

View solution in original post

5 Replies
Clever_Anjos
Employee
Employee

No, you can´t have two colors in same cell

petter
Partner - Champion III
Partner - Champion III

If you add an extra dimension that constitutes 20 values you can get the extra subdivision you need. Then you can color each cell with an expression. It is a little pain to set it all up - but it could work for you.

Not applicable
Author

Hi,

Thanks for Response...

Can we give any single color..

This expression also not working..

if(Party='Green' and 'RED' , Red())



settu_periasamy
Master III
Master III

Hi Nagaraju,

Try like this..

if(Party='Green' and Party='RED' , Red())


** Check the Party Field, it is a case sensitive

Edit:

You can try the below expression in your text background

if(Concat(DISTINCT Party)='Green', Green(),

  if(Concat(DISTINCT Party)='RED' , Blue(),

     if(Concat(DISTINCT Party)='GreenRED', RGB(255,0,100),

  if(Concat(DISTINCT Party)='Orange' , rgb(120,225,0),

  if(Concat(DISTINCT Party)='GreenYellow' , rgb(100,200,0),

  if(Concat(DISTINCT Party)='Yellow', Yellow()))))))

Not applicable
Author

Thank you so much Settu............

It's very helpful to me..