Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
infock12
Creator III
Creator III

Counting If between numbers

Hi All,

I am using a straight table and trying to multiple two columns and add background colour based on the results.

The expression is Maths * English

In the "Background Colour" Section under expressions, I added,

=IF(Maths * English>12, LightRed(),
if(Maths * English<=12 and if(Maths * English>=8, LightMagenta()), LightGray())).

The first If works (>12 changes to LightRed()). However, LightGray() appears for the second category, i.e., values between 8 and 12. LightMagenta does not appear anywhere. Values below 8 has no background colour, appears in white. What am I doing wrong please?

Regards,

Karthik

1 Solution

Accepted Solutions
rubenmarin

Hi Karthik, try with this:

=IF(Maths * English>12, LightRed(),

   if(Maths * English>=8, LightMagenta(), LightGray())).

View solution in original post

2 Replies
rubenmarin

Hi Karthik, try with this:

=IF(Maths * English>12, LightRed(),

   if(Maths * English>=8, LightMagenta(), LightGray())).

infock12
Creator III
Creator III
Author

Hi Ruben,

Yes, it works. Thank you very much!