Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

Table background color expression

Hi Experts,

Can any one please help me to highlight the background color in the measures other than 0 values only .

In the below table I have used the 

Measure:

Pick(Match(Header2, 'Sun Network A','Island Space','SHGN','SUNLOPS'),
Sum(Sales),Sum(Sales),Sum(Sales),Sum(Sales)
)
 
Background color expression:
Pick(Match(Header2, 'Sun Network A','Island Space','SHGN','SUNLOPS'),
RGB(255,153,51),RGB(102,204,0),RGB(224,224,224),RGB(255,255,153)
)
 

But by the above expression the colors applied to all the values including 0 values also but I need to exclude the color for 0 values.

Please help me on this.

Thanks in advance

Table.png

1 Solution

Accepted Solutions
sunny_talwar

May be use this as your color expression

If(Column(1) <> 0,
  Pick(Match(Header2, 'Sun Network A','Island 
  Space','SHGN','SUNLOPS'), RGB(255,153,51), RGB(102,204,0), 
  RGB(224,224,224), RGB(255,255,153)
  )
)

View solution in original post

6 Replies
poisedon
Contributor III
Contributor III

In background color expression use "if" condition.

if([Sun Network A]=0,white(),)

etc.

mahitham
Creator II
Creator II
Author

Hi Thanks for your reply,
Actually Sun Network A is the record in Header 2 field.
I have to apply Orange color to Sun Network A for only values which are not equal to Zero.
I have created Header1 and Header2 columns in the backend for multileader in pivot like below
Header:
LOAD * Inline [
Header1, Header2
Group1, Sun Network A
Group1, Island Space
Group2,SHGN
Group2,SUNLOPS
];

Pick(Match(Header2, 'Sun Network A','Island Space','SHGN','SUNLOPS'),
RGB(255,153,51),RGB(102,204,0),RGB(224,224,224),RGB(255,255,153)
mahitham
Creator II
Creator II
Author

Hi @sunny_talwar

Could you please help me on above issue to apply the background color to the values which are not equal to zero.

 

poisedon
Contributor III
Contributor III

If you are using pivot table chart go to Data and in all columns just put that "if" in background color expressionUntitled.png

 

 

sunny_talwar

May be use this as your color expression

If(Column(1) <> 0,
  Pick(Match(Header2, 'Sun Network A','Island 
  Space','SHGN','SUNLOPS'), RGB(255,153,51), RGB(102,204,0), 
  RGB(224,224,224), RGB(255,255,153)
  )
)
mahitham
Creator II
Creator II
Author

Thanks a lot for your help @sunny_talwar