Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional Coloring when using fabs() function

Hello, I am trying to see if its possible to use the fabs() function to get the absolute value of a number but use conditional coloring.

Example:

For May, we have 150 Closed Work Orders and 100 Open work Orders, so Closed - Open = 50. This means 50 work orders in the back log were closed (yay!)

For June, we have 100 Closed Work orders and 150 Open work Orders, so in this case Closed - Open = (-50). So 50 was added to the back log (boo!)

I have used the fabs() function in the KPI object to show the absolute value, as to get rid of the negative sign in the KPI object, per my client's request (so in the object both of those instances would just show (+50). However, I want to use the conditional coloring to show that when the count is actually negative number (but isn't displaying as a negative per my client's request and use of fabs) it should be orange and when it is an actual positive number to show back logged reduced, it should be green.

So 50 should be green for May, but orange for June. Ideally, I would like to condition it so it shows the little up and down triangles as well.

Is there a way to do this using the fabs() function? Or perhaps a way to format the expression to just show a negative as a positive for display, but not to change it in the actual expression so the conditioning would work? Thanks in advance!

1 Solution

Accepted Solutions
felipedl
Partner - Specialist III
Partner - Specialist III

Sorry Casey,

I just assumed it would be on Qlikview.

Heres an example on Qlik Sense. To show the absolute value, I edited the numeric representation for the measure.

Felipe.

View solution in original post

7 Replies
felipedl
Partner - Specialist III
Partner - Specialist III

Hi Casey,

See the attached file.

The color formatting is dependent of the difference, and edited in the 'Font' tab of the KPI, still having the absolute value.

Felipe.

Not applicable
Author

I only have the Personal Edition of Qlikview and cannot view it, as we are primarily using Qlik Sense.

felipedl
Partner - Specialist III
Partner - Specialist III

Sorry Casey,

I just assumed it would be on Qlikview.

Heres an example on Qlik Sense. To show the absolute value, I edited the numeric representation for the measure.

Felipe.

Not applicable
Author

When I change the Number formatting to custom and mimic what you put in the example, nothing changes. I'm not quite sure how to replicate what you did.

Not applicable
Author

Nevermind I got it! Thanks!

felipedl
Partner - Specialist III
Partner - Specialist III

Weird,

I don't have an expression there, only a 0 (zero) value as below:

Sample1.png

Other thing is, when I do the formatting of the number like this "#.##0;#.##0":

Sample2.png

It should make the negative and positive numbers (the visual representation) the same way, without the minus sign.

Not applicable
Author

Thanks! I got it! Very helpful!