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: 
Anonymous
Not applicable

How to use colormix2 function

Hello I want to use colormix2 but I do not know how: Specifically I want to combine:

vColorLight=rgb(176,242,242)

vColorMiddle=rgb(153,204,255)

vColorMixDark=rgb(40,115,204)

in

ColorMix2( (rank(total column(1))/(noofrows(TOTAL)/2))-1 ,$(vColorDark), $(VColorLight),$(vColorMiddle))


but it does not work.


I use color as expression and as color code. What am I missing?


1 Solution

Accepted Solutions
yujiyamane
Creator II
Creator II

Thanks for the screenshot.

Technically what you do likes fine to me....

To debug that, I would do following steps.

1. To check if the variables are working fine.

     1.1 Please replace the expression with below and see if it works now.

=ColorMix2((rank(total COlumn(1))/(noofrows(TOTAL)/2))-1,rgb(153,204,255), rgb(176,242,242),rgb(40,115,204))

     If works,the  issue is on your variable definitions. Please add below code in your load script.

    

LEt vColorLight=rgb(176,242,242);

LEt vColorMiddle=rgb(153,204,255);

LEt vColorMixDark=rgb(40,115,204);

2. If still does not work, Replace the dimension with simple one.

Your dimension looks bit complicated. It could be the issue.

3. If it still does not work, Supply me your document.


View solution in original post

9 Replies
yujiyamane
Creator II
Creator II

use below

ColorMix2( (rank(total column(1))/(noofrows(TOTAL)/2))-1 ,$(vColorMixDark), $(vColorLight),$(vColorMiddle))

Anonymous
Not applicable
Author

it does not work.

yujiyamane
Creator II
Creator II

Please find my sample as attachment.

Capture.PNG

Please follow below.

1. In the load script, Add below codes

LEt vColorLight=rgb(176,242,242);

LEt vColorMiddle=rgb(153,204,255);

LEt vColorMixDark=rgb(40,115,204);

2. Create a var chart object.

3. Go to  Appearance  > Colors > Disable the auto > Choose "By Expression" > Add below expression.

ColorMix2((rank(total Column(1))/(noofrows(TOTAL)/2))-1,$(vColorMixDark), $(vColorLight),$(vColorMiddle))

Anonymous
Not applicable
Author

Screenshot_1.png

Anonymous
Not applicable
Author

Screenshot_2.png

Anonymous
Not applicable
Author

Screenshot_3.png

yujiyamane
Creator II
Creator II

Thanks for the screenshot.

Technically what you do likes fine to me....

To debug that, I would do following steps.

1. To check if the variables are working fine.

     1.1 Please replace the expression with below and see if it works now.

=ColorMix2((rank(total COlumn(1))/(noofrows(TOTAL)/2))-1,rgb(153,204,255), rgb(176,242,242),rgb(40,115,204))

     If works,the  issue is on your variable definitions. Please add below code in your load script.

    

LEt vColorLight=rgb(176,242,242);

LEt vColorMiddle=rgb(153,204,255);

LEt vColorMixDark=rgb(40,115,204);

2. If still does not work, Replace the dimension with simple one.

Your dimension looks bit complicated. It could be the issue.

3. If it still does not work, Supply me your document.


Anonymous
Not applicable
Author

great! it wanted =ColorMix2((rank(total COlumn(1))/(noofrows(TOTAL)/2))-1,rgb(153,204,255), rgb(176,242,242),rgb(40,115,204))

yujiyamane
Creator II
Creator II

Great to know!