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

conditional format on function fabs (absolute value)

I've set up my conditional format to 2 columns so that end users can easily identify which #'s are not matching. 

Capture.PNG

The 2 columns are RETURN and SPENT. The POS system will always make the number negative on returns. If the numbers match regardless of -/+ I want them to be highlighted green, and if the numbers do not match highlight them red. 

My syntax for both columns in the background color expression:

if(fabs([RETURN]) = fabs(([SPENT])), green(), lightred())

My syntax doesn't seem to be taking into account of the fabs function. Not sure what the deal here might be. Any ideas?

Labels (2)
2 Replies
sunny_talwar

What are the exact expressions you are using for the two columns you have in the screenshot? Are they just field names? RETURN and SPENT?

124psu
Creator II
Creator II
Author

Hi Sunny, that is correct.

1st column - if(sum(fabs([RETURN])) = sum(fabs([SPENT])), green(), lightred())

2nd column - same thing but the measures are switched.

I did find something a bit off, as there was many cases where both values would be "0" and would be highlighted red when it should in fact be green. Also double checked our data to make sure they weren't minuscule numbers just being shadowed but they are, in fact "0".