Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
CB308
Contributor III
Contributor III

conditional formatting

I want to use conditional formatting (color of fond and background) which would make it easier for users to identify the following in their table.

The value of the expression is as follows: =num(sum (Sales)/sum(Total <Style>(Sales)))

I would like to identify which styles equal the top 50% of total sales by highlight the cell(s) in green and additionally the styles that equal the to 85% in yellow.

Style A and B % Ttl column should be green while style C should be yellow.

Current

Style

Sales Ranking

% Ttl

Cuml %

Ranking

A

100

37.04%

37.04%

1

B

50

18.52%

55.56%

3

C

60

22.22%

77.78%

2

D

40

14.81%

92.59%

4

E

20

7.41%

100.00%

5

Total

270

100.00%

Desired

Style

Sales Ranking

% Ttl

Cuml %

Ranking

A

100

(green)37.04%

37.04%

1

B

50

(green)18.52%

55.56%

3

C

60

(yellow)22.22%

77.78%

2

D

40

14.81%

92.59%

4

E

20

7.41%

100.00%

5

Total

270

100.00%



3 Replies
Not applicable

Expand the Expression node and go into text colour.

Then add the expressions and corresponding value

IF(num(sum (Sales)/sum(Total <Style>(Sales)))>=0.85,Rgb(xx,xx,xx), IF(=num(sum (Sales)/sum(Total <Style>(Sales)))>=0.5,Rgb(0,255,255)))

Hope this is what you want...

CB308
Contributor III
Contributor III
Author

thanks so much for your quick response....

I'm getting error in expression... am i missing something?

IF(num(sum (Sales)/sum(Total <Style>(Sales)))>=0.85,Rgb(xx,xx,xx), IF(=num(sum (Sales)/sum(Total <Style>(Sales)))>=0.5,Rgb(0,255,255)))

will this provide a color for when >50% and a color for when > 85%?

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

you have an unnecessary equal sign "=" after the second IF. I believe the rest should be OK