Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ronman10
Creator
Creator

Text Color Based on Expression for Comparison

Hi Guys,

I have a straight table which contains 2 columns, Avg. Selling Price (ASP) for 2018 and ASP for 2017, Customer wise. I want a comparison between these 2 columns in such a way that if value in ASP 18 column  is greater than the corresponding value in ASP 17 column, the text in ASP 18 should appear in green and red if lower. How can this be achieved? 

Formula I used for ASP calculation is Value 18/Volume18. Please advice.

Thanks,

Rony

1 Solution

Accepted Solutions
jaumecf23
Creator III
Creator III

This is not correct. Try this:

=if(Sum([USD 18])/Sum([Vol 18])>Sum([USD 17])/Sum([Vol 17]), green(),red())

View solution in original post

16 Replies
jaumecf23
Creator III
Creator III

In the Expression you will find different options, one of them is Background color. In that place you can introduce a formula and you can introduce something like this:

=if(Avg. Selling Price (ASP) for 2018 > Avg. Selling Price (ASP) for 2017, green(), red())


Attached an image with more information.

ronman10
Creator
Creator
Author

Hi Jaume and Van,

Thank you for your response. However, I am still not able to get this. Is there any other expression that can help me achieve this?

Jaume,

I entered your expression in the "cell text color" space. Also, I am not able to find any attachment in your response. Could you just paste it along with your response.

Thanks,

Rony

jaumecf23
Creator III
Creator III

Info.png

ronman10
Creator
Creator
Author

Jaume,

This looks like Qlikview. I am using qlik sense.

Rony

jaumecf23
Creator III
Creator III

Then you need to introduce the formula in the Background color expression:

Info.png

ronman10
Creator
Creator
Author

I tried it in both Background color and text color expression but its not working. Is there any way I can do this using the column labels? I am looking for the text color to change accordingly.

Rony

jaumecf23
Creator III
Creator III

From what I know there is no other option. For example if you introduce this value : Red() in the box, there is no affect in your table?

Look the behaviour on my application:

Info.png

ronman10
Creator
Creator
Author

When I introduce Red(), all the numbers in that column turn red. The expression looks fine but the box is not reading the expression as I want.

Rony

jaumecf23
Creator III
Creator III

Can you share the expression?