<?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 Re: Persistent colour not working with calculated dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181765#M519424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob! That does the trick, I was going crazy over this since it seemed to be a fairly easy thing to do &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;. I have never used the color function before so may thanks for sharing that knowledge !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Oct 2016 08:08:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-10-05T08:08:40Z</dc:date>
    <item>
      <title>Persistent colour not working with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181757#M519416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an application where we have 2 similar but different calculated dimensions with 3 different fields in those dimensions. There are 3 colors assigned and in settings we have persistent colors. The problem occurs when you make a selection in on the charts then suddenly the colors jump around even though the text stays in the same order. &lt;SPAN style="font-size: 13.3333px;"&gt;I have tried to use background color with the same expressions but it doesn't work. I suspect it has to do with sort order where I have selected numeric value which works perfect for the text in the dimension but not for the colors. In the screenshots you see how the color jump around but not the text which stays consistent. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;IMG __jive_id="138622" alt="picture1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/138622_picture1.PNG" style="height: 285px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;IMG __jive_id="138623" alt="picture2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/138623_picture2.PNG" style="height: 283px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;first calculated dimension:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;&amp;nbsp; aggr((max([field1]) + max([&lt;SPAN style="font-size: 13.3333px;"&gt;field2&lt;/SPAN&gt;)), field3) = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; OR aggr(max([field4)/(max([field1]) + max([field2])), &lt;SPAN style="font-size: 13.3333px;"&gt;field3&lt;/SPAN&gt;) &amp;gt;= 100,&lt;/P&gt;&lt;P&gt;&amp;nbsp; dual('text1)', 1),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(aggr(max([&lt;SPAN style="font-size: 13.3333px;"&gt;field4&lt;/SPAN&gt;])/(max(&lt;SPAN style="font-size: 13.3333px;"&gt;field1&lt;/SPAN&gt;]) + max([&lt;SPAN style="font-size: 13.3333px;"&gt;field2&lt;/SPAN&gt;])), &lt;SPAN style="font-size: 13.3333px;"&gt;field3&lt;/SPAN&gt;) &amp;lt; 100,&lt;/P&gt;&lt;P&gt;&amp;nbsp; dual('text2', 2),&lt;/P&gt;&lt;P&gt;&amp;nbsp; dual('text3', 3)&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;background colour:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if(&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; aggr((max([field1]) + max([&lt;SPAN style="font-size: 13.3333px;"&gt;field2&lt;/SPAN&gt;)), field3) = 0&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; OR aggr(max([field4)/(max([field1]) + max([field2])), &lt;SPAN style="font-size: 13.3333px;"&gt;field3&lt;/SPAN&gt;) &amp;gt;= 100,&lt;/P&gt;&lt;P&gt;&amp;nbsp; RGB(0,128,64),&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp; if(aggr(max([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;field4&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;])/(max(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;field1&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;]) + max([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;field2&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;])), &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;field3&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;) &amp;lt; 100,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; RGB(192,192,192),&lt;/P&gt;&lt;P&gt;&amp;nbsp; RGB(255,217,47)&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;count(DISTINCT field3) / count(DISTINCT TOTAL field3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other calculated dimension is similar:&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;&amp;nbsp; aggr(max([field5]), &lt;SPAN style="font-size: 13.3333px;"&gt;field3&lt;/SPAN&gt;) = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; OR aggr(max([&lt;SPAN style="font-size: 13.3333px;"&gt;field4&lt;/SPAN&gt;])/max([&lt;SPAN style="font-size: 13.3333px;"&gt;field5&lt;/SPAN&gt;]), &lt;SPAN style="font-size: 13.3333px;"&gt;field3&lt;/SPAN&gt;) &amp;gt;= 100,&lt;/P&gt;&lt;P&gt;&amp;nbsp; dual('text4)', 1) ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(aggr(max([&lt;SPAN style="font-size: 13.3333px;"&gt;field4&lt;/SPAN&gt;])/max([&lt;SPAN style="font-size: 13.3333px;"&gt;field5&lt;/SPAN&gt;]), &lt;SPAN style="font-size: 13.3333px;"&gt;field3&lt;/SPAN&gt;) &amp;lt; 100,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;dual('text5', 2),&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; dual('text6', 3)&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;Background colour2:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;=&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if(&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; aggr(max([field5]), &lt;SPAN style="font-size: 13.3333px;"&gt;field3&lt;/SPAN&gt;) = 0&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; OR aggr(max([&lt;SPAN style="font-size: 13.3333px;"&gt;field4&lt;/SPAN&gt;])/max([&lt;SPAN style="font-size: 13.3333px;"&gt;field5&lt;/SPAN&gt;]), &lt;SPAN style="font-size: 13.3333px;"&gt;field3&lt;/SPAN&gt;) &amp;gt;= 100,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp; RGB(0,128,64),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; if(aggr(max([&lt;SPAN style="font-size: 13.3333px;"&gt;field4&lt;/SPAN&gt;])/max([&lt;SPAN style="font-size: 13.3333px;"&gt;field5&lt;/SPAN&gt;]), &lt;SPAN style="font-size: 13.3333px;"&gt;field3&lt;/SPAN&gt;) &amp;lt; 100,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; RGB(192,192,192),&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; RGB(255,217,47)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; )&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Expression3:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;count(DISTINCT field3) / count(DISTINCT TOTAL field3)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 07:19:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181757#M519416</guid>
      <dc:creator />
      <dc:date>2016-09-26T07:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent colour not working with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181758#M519417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to share a sample to look at the issue? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 16:21:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181758#M519417</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-26T16:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent colour not working with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181759#M519418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;i tried to replicate the issue with dummy data, I think I got the same issue at least&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 11:31:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181759#M519418</guid>
      <dc:creator />
      <dc:date>2016-09-27T11:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent colour not working with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181760#M519419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you checked the sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 06:34:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181760#M519419</guid>
      <dc:creator />
      <dc:date>2016-10-03T06:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent colour not working with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181761#M519420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have not, but I plan to check this sometime today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 11:44:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181761#M519420</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-04T11:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent colour not working with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181762#M519421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;also check Repeat Last Color and try&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 13:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181762#M519421</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2016-10-04T13:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent colour not working with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181763#M519422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately it is not that simple, the problem is that there are 2 different pie charts that contains the same expression but different calculated dimensions. If i choose persistent color and repeat last it works fine for the one chart I am interacting with but the other one gets the wrong color order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 13:10:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181763#M519422</guid>
      <dc:creator />
      <dc:date>2016-10-04T13:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent colour not working with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181764#M519423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your background color expression should be in the Expression, not the Dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Repeating the Calculated dim in a &lt;STRONG&gt;color() f&lt;/STRONG&gt;unction in your sample works for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=color(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; aggr((max([S KF]) + max([S PM])), VIN) = 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; OR aggr(max([Total time])/(max([S KF]) + max([S PM])), VIN) &amp;gt;= 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ,1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if(aggr(max([Total time])/(max([S KF]) + max([S PM])), VIN) &amp;lt; 100,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;,VIN)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note the addition of the outer aggr(). You should probably have that in the Dimension def as well for consistency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 14:19:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181764#M519423</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-10-04T14:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent colour not working with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181765#M519424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob! That does the trick, I was going crazy over this since it seemed to be a fairly easy thing to do &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;. I have never used the color function before so may thanks for sharing that knowledge !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 08:08:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181765#M519424</guid>
      <dc:creator />
      <dc:date>2016-10-05T08:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent colour not working with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181766#M519425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad it worked. Here's another clever thing you can use color() for. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2014/01/a-color-trick/" title="http://qlikviewcookbook.com/2014/01/a-color-trick/"&gt;A Color Trick | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 18:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Persistent-colour-not-working-with-calculated-dimension/m-p/1181766#M519425</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-10-05T18:59:38Z</dc:date>
    </item>
  </channel>
</rss>

