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: 
ishansjain2095
Creator
Creator

Compare 2 fields in same table using set analysis with conditional formatting in color expression

Hi All,

Can anyone help me with qlik sense expression i.e. comparing Col C4 with C7 and range the values in color form as shown in the attachment shared below?

Labels (1)
9 Replies
ishansjain2095
Creator
Creator
Author

By mistakenly changed column names.

Sorry...

Kushal_Chawda

what are the rules for color?

ishansjain2095
Creator
Creator
Author

Hi Kush,

Well rule for colors are:

Red  T4      +50%
Orange  T4      +>20%
Yellow  T4  +>1% to 20%
Green  T4   + = 0 to 1%

 

These ranges should be compared with col T7  as shown in attachment.

 

Kind Regards,

Ishan

Kushal_Chawda

Which columns are part of the data? T1 & T2 only?

ishansjain2095
Creator
Creator
Author

Well T1 is date of purchased items and T2 is based on ratio of each products. Can you just help me with the T7 column that how to get background colour in qlik sense colour expression.

Kushal_Chawda

Yes. But I want to know which are the actual data columns? from T3 onwards all are calculated. So I need to build the logic on actual data columns and then calculate others. Are T1 & T2 columns actually available in data or they are also calculated

Kushal_Chawda

as per the data. Create a Table chart. Add below Measure  

=T6/T5

Now in Measure properties->background colour expression, put below expression

=if(column(1)>0.01 and column(1)<=0.2, Yellow,

if(column(1)>0.2 and column(1)<=0.5, Orange,

if(column(1)>0.5 , Red, Green)))

Note: Define colors with RGB function or you can use Html color codes eg. ('FF5733')

farolito20
Contributor III
Contributor III

Hello,

 

Were you able to use set analysis for this?

ishansjain2095
Creator
Creator
Author

Is there any way to compare Day 1 to Day 0 from monthstart to monthend using set analysis??