Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dreweezy
Partner - Creator II
Partner - Creator II

format a straight table similar to excel conditional formatting

I have a table below in Qlik Sense

.Capture.PNG

Column C was derived by computing 'B - A'

I am trying to conditional format column B in Qlik sense so that if B - A > 30 days, it should be highlighted in yellow. 

=if([End Date] - [Start Date] > 30, yellow()) 

Having some issues and any thoughts are welcomed. Thank you.

 

1 Solution

Accepted Solutions
Channa
Specialist III
Specialist III

=if(([End Date] - [Start Date] )> 30, yellow()) 

expression looks good just 

under enddate dimension u have expression for background color

it should work

Channa

View solution in original post

5 Replies
Channa
Specialist III
Specialist III

=if(([End Date] - [Start Date] )> 30, yellow()) 

expression looks good just 

under enddate dimension u have expression for background color

it should work

Channa
dreweezy
Partner - Creator II
Partner - Creator II
Author

Thank you Channa, I was placing the expression in the wrong area. My last question - how do I go about adding another condition in one shot? 

condition 1 - >30 days then highlight yellow

condition 2 - if 2 columns are marked as 'N/A' (lets say columns A & B) then this should be blue

 

=if(([End Date] - [Start Date] )> 30, yellow() and {A} = 'N/A', {B} = 'N/A', blue()) 

I know this is incorrect but I want to highlight cells blue depending on 2 other columns that have values 'N/A'.

Channa
Specialist III
Specialist III

=if( ([End Date] - [Start Date] )> 30, yellow() and {A} = 'N/A', {B} = 'N/A', blue()) 

 

A and B or different Columns or those start and end dates??
IF(A<>'N/A' and B <> 'N/A' and ([End Date] - [Start Date] )> 30, yellow(),blue())

Channa
dreweezy
Partner - Creator II
Partner - Creator II
Author

This works for me. As always - much appreciated for your help.

dreweezy
Partner - Creator II
Partner - Creator II
Author

Channa - hope I am still able to catch you. If I wanted to add one more to say anything >90 days I want it RED. How do I place that in my statement?

 

=if( ([End Date] - [Start Date] )> 30, yellow(), if(([End Date] - [Start Date] )> 90, red())