<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic help on ColorMix1 function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838899#M532910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my dashboard to maintain same color combination i have used ColorMix1 function as a background expression on almost all the charts. The results are as per expectations but when selecting a single selection on any chart the color is turning to Black.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am using Red and Green as my primary colors and this is working fine when there are two customer countries.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/83728_screen1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. When i click on 'Northern Region - Penang' Customer country the color on pie chart becoming Black and on legend it is blue. But i want it to be either green or red based on the sales amount.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/83729_screen2.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Formula i used on my expression tab is 'Sum(Sales)'&lt;/P&gt;&lt;P&gt;and background expression is&lt;/P&gt;&lt;P&gt;'ColorMix1 ((1+Sign(2*(sum(Sales)-RangeMin (top(total sum(Sales),1,NoOfRows(total))))/(RangeMax (top(total sum(Sales),1,NoOfRows(total)))-RangeMin (top(total sum(Sales),1,NoOfRows(total))))-1)*Sqrt(Fabs((2*(sum(Sales)-RangeMin (top(total sum(Sales),1,NoOfRows(total))))/(RangeMax (top(total sum(Sales),1,NoOfRows(total)))-RangeMin (top(total sum(Sales),1,NoOfRows(total))))-1))))/2, cBad,cGood)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cBad value is =rgb(230,51,26)&lt;/P&gt;&lt;P&gt;CGood value is =rgb(145,180,50)&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me to resolve this issue. Any help will be more appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Apr 2015 12:12:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-15T12:12:43Z</dc:date>
    <item>
      <title>help on ColorMix1 function</title>
      <link>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838899#M532910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my dashboard to maintain same color combination i have used ColorMix1 function as a background expression on almost all the charts. The results are as per expectations but when selecting a single selection on any chart the color is turning to Black.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am using Red and Green as my primary colors and this is working fine when there are two customer countries.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/83728_screen1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. When i click on 'Northern Region - Penang' Customer country the color on pie chart becoming Black and on legend it is blue. But i want it to be either green or red based on the sales amount.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/83729_screen2.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Formula i used on my expression tab is 'Sum(Sales)'&lt;/P&gt;&lt;P&gt;and background expression is&lt;/P&gt;&lt;P&gt;'ColorMix1 ((1+Sign(2*(sum(Sales)-RangeMin (top(total sum(Sales),1,NoOfRows(total))))/(RangeMax (top(total sum(Sales),1,NoOfRows(total)))-RangeMin (top(total sum(Sales),1,NoOfRows(total))))-1)*Sqrt(Fabs((2*(sum(Sales)-RangeMin (top(total sum(Sales),1,NoOfRows(total))))/(RangeMax (top(total sum(Sales),1,NoOfRows(total)))-RangeMin (top(total sum(Sales),1,NoOfRows(total))))-1))))/2, cBad,cGood)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cBad value is =rgb(230,51,26)&lt;/P&gt;&lt;P&gt;CGood value is =rgb(145,180,50)&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me to resolve this issue. Any help will be more appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 12:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838899#M532910</guid>
      <dc:creator />
      <dc:date>2015-04-15T12:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: help on ColorMix1 function</title>
      <link>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838900#M532911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ColorMix1 ((1+Sign(2*(sum({&amp;lt;CustomerCountry=&amp;gt;}Sales)-RangeMin (top(total sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;CustomerCountry=&amp;gt;}&lt;/SPAN&gt;Sales),1,NoOfRows(total))))/(RangeMax (top(total sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;CustomerCountry=&amp;gt;}&lt;/SPAN&gt;Sales),1,NoOfRows(total)))-RangeMin (top(total sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;CustomerCountry=&amp;gt;}&lt;/SPAN&gt;Sales),1,NoOfRows(total))))-1)*Sqrt(Fabs((2*(sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;CustomerCountry=&amp;gt;}&lt;/SPAN&gt;Sales)-RangeMin (top(total sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;CustomerCountry=&amp;gt;}&lt;/SPAN&gt;Sales),1,NoOfRows(total))))/(RangeMax (top(total sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;CustomerCountry=&amp;gt;}&lt;/SPAN&gt;Sales),1,NoOfRows(total)))-RangeMin (top(total sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;CustomerCountry=&amp;gt;}&lt;/SPAN&gt;Sales),1,NoOfRows(total))))-1))))/2, cBad,cGood)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 12:50:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838900#M532911</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-04-15T12:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: help on ColorMix1 function</title>
      <link>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838901#M532912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your quick response. After i use your formula the chart stopped responding and even I am unable to go further to other customer countries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be more precise I am attaching sample qvw with both the pie charts on place.&lt;/P&gt;&lt;P&gt;When ever i try to select single Customer or Customer Country the color is black.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 13:14:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838901#M532912</guid>
      <dc:creator />
      <dc:date>2015-04-15T13:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: help on ColorMix1 function</title>
      <link>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838902#M532913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're using dimension limits to show only the first five and group the rest as Other. I don't have a solution to handle such a use case. Once you select one value the colormix function won't work anymore because there's only one value of sum(Sales) left to calculate with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 13:55:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838902#M532913</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-04-15T13:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: help on ColorMix1 function</title>
      <link>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838903#M532914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the explanation Gysbert, Now i understand why it is getting failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added an If condition to avoid black color and I have given a blue color which is more meaningful as the color between Legend and graph matched perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(isnull(ColorMix1 ((1+Sign(2*(sum(Sales)-RangeMin (top(total sum(Sales),1,NoOfRows(total))))/(RangeMax (top(total sum(Sales),1,NoOfRows(total)))-RangeMin (top(total sum(Sales),1,NoOfRows(total))))-1)*Sqrt(Fabs((2*(sum(Sales)-RangeMin (top(total sum(Sales),1,NoOfRows(total))))/(RangeMax (top(total sum(Sales),1,NoOfRows(total)))-RangeMin (top(total sum(Sales),1,NoOfRows(total))))-1))))/2, cBad,cGood)),&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RGB(141,170,203),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ColorMix1 ((1+Sign(2*(sum(Sales)-RangeMin (top(total sum(Sales),1,NoOfRows(total))))/(RangeMax (top(total sum(Sales),1,NoOfRows(total)))-RangeMin (top(total sum(Sales),1,NoOfRows(total))))-1)*Sqrt(Fabs((2*(sum(Sales)-RangeMin (top(total sum(Sales),1,NoOfRows(total))))/(RangeMax (top(total sum(Sales),1,NoOfRows(total)))-RangeMin (top(total sum(Sales),1,NoOfRows(total))))-1))))/2, cBad,cGood))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 04:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-on-ColorMix1-function/m-p/838903#M532914</guid>
      <dc:creator />
      <dc:date>2015-04-16T04:32:22Z</dc:date>
    </item>
  </channel>
</rss>

