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

How to color column in straight table when value is high or low?

Hi,

I have added below query to make "RED" if plan is more than actual and if actual is more than plan "GREEN"

if(Avg([Plan PSD_FM])> Avg([Actual PSD_FM]),RGB(255,99,71),RGB(50,205,50))

but in 0 its shows "GREEN" I want to make it "WHITE" in 0. please find the image in the attachment

1 Solution

Accepted Solutions
Not applicable
Author

Dear all,

Thanks you so much! for helping me and gave me the idea to find out

well below query works well

If(Alt(Avg([Actual PSD_FM]=0), RGB(255, 255, 255)), if(Avg([Plan PSD_FM])> Avg([Actual PSD_FM]),RGB(255,99,71),RGB(50,205,50)))

View solution in original post

10 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try this


If(isnull(Avg([Plan PSD_FM]) or isnull([Actual PSD_FM]), rgb(255,255,255),

if(Avg([Plan PSD_FM])> Avg([Actual PSD_FM]),RGB(255,99,71),RGB(50,205,50))

)


Let me know

sasikanth
Master
Master

hi,

"but in 0 its shows "GREEN" I want to make it "WHITE" in 0."

What is '0' here-->

jagan
Luminary Alumni
Luminary Alumni

Hi,


Try like this


If(Alt(Avg([Actual PSD_FM]), 0) = 0, RGB(255, 255, 255), if(Avg([Plan PSD_FM])> Avg([Actual PSD_FM]),RGB(255,99,71),RGB(50,205,50))


Regards,

Jagan.

Not applicable
Author

NO

All fields go "WHITE"

Not applicable
Author

well I have a table where I show If Actual is grater than Plan "GREEN"

and If Plan is grater than Actual "RED" but still there are some fields where there is no values in Plan or Actual so it also showing "GREEN" on my table I want to make only those files "BLANK or With out any colouring" which means "WHITE"

Not applicable
Author

No its not making the NULL fields WHITE

Not applicable
Author

Dear all,

Thanks you so much! for helping me and gave me the idea to find out

well below query works well

If(Alt(Avg([Actual PSD_FM]=0), RGB(255, 255, 255)), if(Avg([Plan PSD_FM])> Avg([Actual PSD_FM]),RGB(255,99,71),RGB(50,205,50)))

jagan
Luminary Alumni
Luminary Alumni

Hi,

Please close this post by giving Correct Answer to the Post which helps in fixing your issue, it helps other in finding the solution.

Regards,

Jagan.

Not applicable
Author

How do I do that?