<?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: Problem getting the result I want in a pie chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436019#M569077</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached an image that shows the extra image.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="24321" class="jive-image" alt="piechart.JPG" src="https://community.qlik.com/legacyfs/online/24321_piechart.JPG" /&gt;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Oct 2012 20:02:43 GMT</pubDate>
    <dc:creator>bagdwan1</dc:creator>
    <dc:date>2012-10-27T20:02:43Z</dc:date>
    <item>
      <title>Problem getting the result I want in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436011#M569069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having difficulties getting the result I want in a pie chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a document that illustrates my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I want to have 2 pie charts.&lt;/P&gt;&lt;P&gt;The first one should show how many users there are per CAL type (NamedUser and Doc in the attached file).&lt;/P&gt;&lt;P&gt;This is already working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second pie chart is the problem (named "Number of CALs per CAL Type" in the attached file).&lt;/P&gt;&lt;P&gt;I want it to show how many CALs of each cal type that is needed.&lt;/P&gt;&lt;P&gt;In this example it should show 1 NamedUserCAL and 6 Doc CALs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But everything I have tested has failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to do this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br &lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Oct 2012 19:35:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436011#M569069</guid>
      <dc:creator>bagdwan1</dc:creator>
      <dc:date>2012-10-20T19:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting the result I want in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436012#M569070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;(sounds german)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try the code below as expression in your second chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(aggr(textcount(DISTINCT Document), User)&amp;gt;3, Count( DISTINCT User), count(User))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HtH&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Oct 2012 20:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436012#M569070</guid>
      <dc:creator />
      <dc:date>2012-10-20T20:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting the result I want in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436013#M569071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roland,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looked promising but unfortunately your suggestions did not solve my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have updated the attached file to illustrate why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the same user opens the same document more than one time, they are counted each time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only want distinct documents per user when the user has opened less than 4 documents and distinct users for those users that have opended 4 or more documents. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And by the way, I'm not german, I'm swedish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Oct 2012 22:47:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436013#M569071</guid>
      <dc:creator>bagdwan1</dc:creator>
      <dc:date>2012-10-20T22:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting the result I want in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436014#M569072</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; From my understanding, i think you want like this''&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= if user open the document less than 4 means want to count the document ,otherwise want to count the user?? am i correct??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(aggr(textcount(DISTINCT Document), User)&amp;lt;4, Count( Document), count(distinct User))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(aggr(textcount(DISTINCT Document), User)&amp;gt;3, aggr(textcount(DISTINCT Document), User), count(distinct User))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;helps you..&lt;/P&gt;&lt;P&gt;sorry, i didn't open the file..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Oct 2012 22:57:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436014#M569072</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-10-20T22:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting the result I want in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436015#M569073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached qvw. Is that what you need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 09:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436015#M569073</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-10-21T09:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting the result I want in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436016#M569074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"I only want distinct documents per user when the user has opened less than 4 documents and distinct users for those users that have opended 4 or more documents."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Ok, got it.&lt;/P&gt;&lt;P&gt;So I applied a new dimension called "DocType" (see Script). This dim may be useful in several charts. I used it in my expression within the IF()-Clause as a switch and also in the other pie chart as a "normal" dim. And the two different countings (in one expression!) should work as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"And by the way, I'm not german, I'm swedish."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Sorry, I thought that I may have met an old fellow martin I didn't see for some years.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HtH&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 10:56:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436016#M569074</guid>
      <dc:creator />
      <dc:date>2012-10-21T10:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting the result I want in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436017#M569075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roland,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution both works and dont work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It gives the correct values but since your have created a static version of CALType per user it will not work when&amp;nbsp; other selections are made, e.g. dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But perhaps it is better to remove the possibility to select dates and calculate this in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 21:18:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436017#M569075</guid>
      <dc:creator>bagdwan1</dc:creator>
      <dc:date>2012-10-21T21:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting the result I want in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436018#M569076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution gives the right result but it also shows a second figure in the pie chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to remove the extra figure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 21:23:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436018#M569076</guid>
      <dc:creator>bagdwan1</dc:creator>
      <dc:date>2012-10-21T21:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting the result I want in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436019#M569077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached an image that shows the extra image.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="24321" class="jive-image" alt="piechart.JPG" src="https://community.qlik.com/legacyfs/online/24321_piechart.JPG" /&gt;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Oct 2012 20:02:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436019#M569077</guid>
      <dc:creator>bagdwan1</dc:creator>
      <dc:date>2012-10-27T20:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting the result I want in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436020#M569078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fun. It looks fine in QV 10, but in QV 11 you get the extra number in a pie chart with no dimension and two expressions. Ok, here's a version that looks ok in QV 11 too with one dimension and one expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Oct 2012 10:03:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-getting-the-result-I-want-in-a-pie-chart/m-p/436020#M569078</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-10-28T10:03:31Z</dc:date>
    </item>
  </channel>
</rss>

