<?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: Creating calculated dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255793#M871567</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jyothish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies for the confusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample data set will be as such:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143984_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My pie chart should show something along the lines of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/143985_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Nov 2016 06:12:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-11-16T06:12:08Z</dc:date>
    <item>
      <title>Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255790#M871564</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 3 tables with individual information, and I am trying to create a pie chart to show family status. The key fields are as folows:&lt;/P&gt;&lt;P&gt;ID = ID number of individuals&lt;/P&gt;&lt;P&gt;Role = Parent/Child&lt;/P&gt;&lt;P&gt;RegNo = Household Number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143980_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to create pie charts with the following:&lt;/P&gt;&lt;P&gt;- Number of children in a household (Chart should show me Count(Distinct(RegNo)) with Age &amp;lt;=8 and Role = Child&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently using the code in Expressions&lt;/P&gt;&lt;P&gt;COUNT( {&amp;lt; Age = {"&amp;gt;=0 &amp;lt;=15"}, Role = {Child}&amp;nbsp; &amp;gt;}DISTINCT(RegNo))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Dimension, I am trying to get the pie chart to show "0 Children", "1 Child", "2 Children", "&amp;gt;2 Children", however I am unsure of how to proceed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Number of Members in a hosuehold&lt;/P&gt;&lt;P&gt;Expression: COUNT (DISTINCT ( RegNo))&lt;/P&gt;&lt;P&gt;Dimension: Should show "1 Member", "2 Members", "3 Members"...."&amp;gt;5 Members"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice will be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255790#M871564</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255791#M871565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chay,&lt;/P&gt;&lt;P&gt;Can you share a sample data ? Then it will be easy for us to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q1. What do you mean by dimension "0 Children", "1 Child", "2 Children", "&amp;gt;2 Children" when you are already showing only the children who are less than 15 yrs old ? I am a bit confused.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 05:52:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255791#M871565</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2016-11-16T05:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255792#M871566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try something like this in Dimension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If( Aggr(count({&amp;lt;Role ={'Child'}&amp;gt;}ID),RegNo)=0,'0 Children', if(Aggr(count({&amp;lt;Role = {'Child'}&amp;nbsp; &amp;gt;}ID),RegNo)=1,'1 Children',if(Aggr(count({&amp;lt;Role = {'Child'}&amp;nbsp; &amp;gt;}ID),RegNo)=2,'2 Children',if(Aggr(count({&amp;lt;Role = {'Child'}&amp;nbsp; &amp;gt;}ID),RegNo)=&amp;gt;2,'&amp;gt;2 Children'))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 06:08:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255792#M871566</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2016-11-16T06:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255793#M871567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jyothish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies for the confusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample data set will be as such:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143984_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My pie chart should show something along the lines of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/143985_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 06:12:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255793#M871567</guid>
      <dc:creator />
      <dc:date>2016-11-16T06:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255794#M871568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do it with an expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(COUNT({&amp;lt;Age = {"&amp;gt;=0 &amp;lt;=15"}, Role = {Child}&amp;gt;} DISTINCT RegNo) = 0, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Dual('0 Children', 0),&lt;/P&gt;&lt;P&gt;If(COUNT({&amp;lt;Age = {"&amp;gt;=0 &amp;lt;=15"}, Role = {Child}&amp;gt;} DISTINCT RegNo) = 1, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Dual('1 Child', 1),&lt;/P&gt;&lt;P&gt;If(COUNT({&amp;lt;Age = {"&amp;gt;=0 &amp;lt;=15"}, Role = {Child}&amp;gt;} DISTINCT RegNo) = 2, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Dual('2 Children', 2),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dual('&amp;gt;2 Children', 3)&lt;/P&gt;&lt;P&gt;)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I would recommend doing this calculation in the back-end as this sort of calculation can perform poorly in the front end if your data set is large.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 06:15:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255794#M871568</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-11-16T06:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255795#M871569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give a try with my expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 06:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255795#M871569</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2016-11-16T06:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255796#M871570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response. If I were to implement this in the back end, which table do you reckon I should place that code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 06:22:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255796#M871570</guid>
      <dc:creator />
      <dc:date>2016-11-16T06:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255797#M871571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pfa sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 06:35:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255797#M871571</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2016-11-16T06:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255798#M871572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, working well. Only issue is that the last '=&amp;gt;2' was causing an error, so I'm simply using &amp;gt;1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 06:47:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255798#M871572</guid>
      <dc:creator />
      <dc:date>2016-11-16T06:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255799#M871573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it was fixed in the attached app. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 08:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255799#M871573</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2016-11-16T08:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255800#M871574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 09:05:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-calculated-dimension/m-p/1255800#M871574</guid>
      <dc:creator />
      <dc:date>2016-11-16T09:05:26Z</dc:date>
    </item>
  </channel>
</rss>

