<?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: Two-Dimensional Pie Chart :-( in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537902#M555415</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This one is the closest to the desired result.&amp;nbsp; The remaining problem - the first value of the second dimension takes color from the first dimension.&amp;nbsp; Interestingly, the colors in legend are correct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;if(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;count&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;distinct&lt;/SPAN&gt; Dim2),Dim1)&amp;gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim1=&lt;SPAN style="color: #363636;"&gt;'A'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;4&lt;/SPAN&gt;),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim1=&lt;SPAN style="color: #363636;"&gt;'B'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;5&lt;/SPAN&gt;),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim1=&lt;SPAN style="color: #363636;"&gt;'C'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;6&lt;/SPAN&gt;),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim1=&lt;SPAN style="color: #363636;"&gt;'D'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;7&lt;/SPAN&gt;)))))&lt;BR /&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim2=&lt;SPAN style="color: #363636;"&gt;'X'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;),&amp;nbsp; &lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// this part doesn't work&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim2=&lt;SPAN style="color: #363636;"&gt;'Y'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim2=&lt;SPAN style="color: #363636;"&gt;'Z'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;3&lt;/SPAN&gt;))))&lt;BR /&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG __jive_id="44740" class="jive-image-thumbnail jive-image" height="210" onclick="" alt="2D_Pie_4.png" src="https://community.qlik.com/legacyfs/online/44740_2D_Pie_4.png" width="317" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Jul 2013 14:51:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-07-30T14:51:27Z</dc:date>
    <item>
      <title>Two-Dimensional Pie Chart :-(</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537899#M555410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;"&gt;First, I want to apologize for this sort of question.&amp;nbsp; I don’t have much respect for the pie charts in general, and even less for the 2-dimensional pies.&amp;nbsp; But this is what our client has already, and they insist on keeping it.&amp;nbsp; The problem is with the colors.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;"&gt;The color pallet is the same for the “internal” and “external” pies.&amp;nbsp; Client wants the pies to have different colors.&amp;nbsp; For example, internal pie (first dimension) using colors 1, 2, 3, and 4, and the external pie (second dimension) – colors 5, 6, and 7:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;IMG __jive_id="44723" alt="2D_Pie.png" class="jive-image" height="160" src="https://community.qlik.com/legacyfs/online/44723_2D_Pie.png" width="167" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;"&gt;I tried a variety of approaches in the background color expression, but with no much success.&amp;nbsp; The internal pie gets all same colors, or the external color repeats the first color of the internal pie. &lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;"&gt;Appreciate any ideas.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;"&gt;hanks you, &lt;BR /&gt;Michael&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;"&gt;PS: I can do it using combined “object” with overlapping pies, but looking for a cleaner solution, one object.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 13:03:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537899#M555410</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-30T13:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Two-Dimensional Pie Chart :-(</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537900#M555411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Starting from the second dimension you have to set personalized colours in the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have for example &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Country (first dim)&lt;/P&gt;&lt;P&gt;City (second dim)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to wtite in the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(City='new york', rgb(x,y,z),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if Country='France', rgb(a,b,c),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 13:24:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537900#M555411</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2013-07-30T13:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Two-Dimensional Pie Chart :-(</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537901#M555413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for trying Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish it were that's simple...&amp;nbsp; First, your expression guarantees the same color for internal, and for at least the first external.&amp;nbsp; Test, and see how it looks.&amp;nbsp; Second, there is a logical gap - where do you insert conditions for the next city?&amp;nbsp; Well, I can handle the second one, but it doesn't help.&amp;nbsp; Besides, we have the same values of the 2nd dimesion within each value of the first dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm attaching an example, in case anyone wants to test.&amp;nbsp; It contains the exact number of values in my dimensions - 4 in Dim1, and 3 in Dim2.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: Using the previously attched example.&amp;nbsp; Expression starting with Dim2&lt;/P&gt;&lt;P&gt;if(Dim2='X',&lt;/P&gt;&lt;P&gt; if(Dim1='A', color(1),&lt;/P&gt;&lt;P&gt; if(Dim1='B', color(2),&lt;/P&gt;&lt;P&gt; if(Dim1='C', color(3),&lt;/P&gt;&lt;P&gt; if(Dim1='D', color(4), color(5))))),&lt;/P&gt;&lt;P&gt;if(Dim2='Y',&lt;/P&gt;&lt;P&gt; if(Dim1='A', color(1),&lt;/P&gt;&lt;P&gt; if(Dim1='B', color(2),&lt;/P&gt;&lt;P&gt; if(Dim1='C', color(3),&lt;/P&gt;&lt;P&gt; if(Dim1='D', color(4), color(6))))),&lt;/P&gt;&lt;P&gt;if(Dim2='Z',&lt;/P&gt;&lt;P&gt; if(Dim1='A', color(1),&lt;/P&gt;&lt;P&gt; if(Dim1='B', color(2),&lt;/P&gt;&lt;P&gt; if(Dim1='C', color(3),&lt;/P&gt;&lt;P&gt; if(Dim1='D', color(4), color(7)))))&lt;/P&gt;&lt;P&gt;)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Results is this, using only colors 1 to 4:&lt;/P&gt;&lt;P&gt; &lt;IMG alt="2D_Pie_2.png" class="jive-image-thumbnail jive-image" height="204" onclick="" src="https://community.qlik.com/legacyfs/online/44733_2D_Pie_2.png" width="288" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An opposit approach:&lt;/P&gt;&lt;P&gt;if(Dim1='A',&lt;/P&gt;&lt;P&gt; if(Dim2='X', color(5),&lt;/P&gt;&lt;P&gt; if(Dim2='Y', color(6),&lt;/P&gt;&lt;P&gt; if(Dim2='Z', color(7), color(1)))),&lt;/P&gt;&lt;P&gt;if(Dim1='B',&lt;/P&gt;&lt;P&gt; if(Dim2='X', color(5),&lt;/P&gt;&lt;P&gt; if(Dim2='Y', color(6),&lt;/P&gt;&lt;P&gt; if(Dim2='Z', color(7), color(2)))),&lt;/P&gt;&lt;P&gt;if(Dim1='C',&lt;/P&gt;&lt;P&gt; if(Dim2='X', color(5),&lt;/P&gt;&lt;P&gt; if(Dim2='Y', color(6),&lt;/P&gt;&lt;P&gt; if(Dim2='Z', color(7), color(3)))),&lt;/P&gt;&lt;P&gt;if(Dim1='D',&lt;/P&gt;&lt;P&gt; if(Dim2='X', color(5),&lt;/P&gt;&lt;P&gt; if(Dim2='Y', color(6),&lt;/P&gt;&lt;P&gt; if(Dim2='Z', color(7), color(4))))&lt;/P&gt;&lt;P&gt;))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gives this, using colors 5 to 7:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2D_Pie_3.png" class="jive-image-thumbnail jive-image" height="200" onclick="" src="https://community.qlik.com/legacyfs/online/44734_2D_Pie_3.png" width="277" /&gt;&lt;/P&gt;&lt;P&gt;Both worse than no expression at all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 13:54:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537901#M555413</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-30T13:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Two-Dimensional Pie Chart :-(</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537902#M555415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This one is the closest to the desired result.&amp;nbsp; The remaining problem - the first value of the second dimension takes color from the first dimension.&amp;nbsp; Interestingly, the colors in legend are correct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;if(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;count&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;distinct&lt;/SPAN&gt; Dim2),Dim1)&amp;gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim1=&lt;SPAN style="color: #363636;"&gt;'A'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;4&lt;/SPAN&gt;),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim1=&lt;SPAN style="color: #363636;"&gt;'B'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;5&lt;/SPAN&gt;),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim1=&lt;SPAN style="color: #363636;"&gt;'C'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;6&lt;/SPAN&gt;),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim1=&lt;SPAN style="color: #363636;"&gt;'D'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;7&lt;/SPAN&gt;)))))&lt;BR /&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim2=&lt;SPAN style="color: #363636;"&gt;'X'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;),&amp;nbsp; &lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// this part doesn't work&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim2=&lt;SPAN style="color: #363636;"&gt;'Y'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(Dim2=&lt;SPAN style="color: #363636;"&gt;'Z'&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;color&lt;/SPAN&gt;(&lt;SPAN style="color: #363636;"&gt;3&lt;/SPAN&gt;))))&lt;BR /&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG __jive_id="44740" class="jive-image-thumbnail jive-image" height="210" onclick="" alt="2D_Pie_4.png" src="https://community.qlik.com/legacyfs/online/44740_2D_Pie_4.png" width="317" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 14:51:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537902#M555415</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-30T14:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Two-Dimensional Pie Chart :-(</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537903#M555416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Moving up...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 20:04:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Dimensional-Pie-Chart/m-p/537903#M555416</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-30T20:04:54Z</dc:date>
    </item>
  </channel>
</rss>

