Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
montubhardwaj
Specialist
Specialist

Color gradient on a QlikView straight table

Hello Community

I wanted to get your views and suggestions on how we can achieve the color gradient on a QlikView straight table. Below is the table where I want to color code (gradient) the column CY vs PY.

2019-01-22_15-07-37.jpg

Below is a sample of how I want this to appear. Please see the color gradient from Blue (positive) to Red (negative).

2019-01-22_15-07-01.jpg

Below is a snapshot from excel showing how it is done. Can you suggest how we can achieve same in QlikView?

2019-01-22_15-06-14.jpg

Attached is a sample qvw for testing.

1 Solution

Accepted Solutions
Vegar
MVP
MVP

You will ned to stretch your expression in such a way that your minimum value is presented with -1 and your maximum +1.

You could take inspiration from this blog using colormix1 . https://qlikfreak.wordpress.com/2014/03/09/heat-map/

View solution in original post

11 Replies
Vegar
MVP
MVP

Take a look at the Qlikview colour function Colormix2()
It can be a bit tricky to get the colour span correct, but it should do the trick for you .
Cheers
Vegar
montubhardwaj
Specialist
Specialist
Author

Thanks for the response. I looked at the Colormix function earlier but that did not work. I am not sure how to replicate the functionality in xls shown above in my example.
montubhardwaj
Specialist
Specialist
Author

Somehow color gradient is not working with Set Analysis... not sure if I am missing something but...

Vegar
MVP
MVP

Try to put your color expressions without the colormix2 wrapped around it as any expression in your object to check if your expressions are set up correctly.
montubhardwaj
Specialist
Specialist
Author

Yes, the expressions are fine... no error there. Its just that I am able to achieve the same or similar gradient as shown in xls.

Vegar
MVP
MVP

Please take a look at the attached picture. The expression used is =colormix2((Column(5)-Column(4))/Column(4), blue(170),lightred(), white()).

image.png

montubhardwaj
Specialist
Specialist
Author

Thanks for taking a shot at this. I don't think it is working as per how it defined in the xls sheet? Did you look at the attached xls snapshot and how the gradient is defined there?  I guess I am not seeing a condition which color the cells as in the xls. Am I missing something ?

Vegar
MVP
MVP

You will ned to stretch your expression in such a way that your minimum value is presented with -1 and your maximum +1.

You could take inspiration from this blog using colormix1 . https://qlikfreak.wordpress.com/2014/03/09/heat-map/
montubhardwaj
Specialist
Specialist
Author

interesting post. I will take a look at this. Thanks again for your suggestion.